Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Steven Edmunds
"include-and-override" Meaning
November 20, 2012 2:47 PM
Answer

Steven Edmunds

Rank: New Member

Posts: 3

Join Date: November 20, 2012

Recent Posts

I'm confused about what the property "include-and-override" means in a properties file:

Say I have a properties file, fileA.properties, and in it I have the line "include-and-override= fileB.properties". Does that mean fileB's properties are included but any matching properties are overriden by the fileA properties, or is it the other way around? It seems strange to me that the included file would be the file that is overridden.
Shinn Lok
RE: "include-and-override" Meaning
November 20, 2012 2:49 PM
Answer

Shinn Lok

LIFERAY STAFF

Rank: Junior Member

Posts: 86

Join Date: January 14, 2011

Recent Posts

David H Nebinger
RE: "include-and-override" Meaning
November 20, 2012 2:50 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11295

Join Date: September 1, 2006

Recent Posts

Comes from using EasyConf, http://easyconf.sourceforge.net

It's a package that allows for importing properties files that override a canned set of properties.

The example here is portal.properties which define all properties the portal needs to operate. In it, there's an include and override for portal-ext.properties, the file that you modify to specify your own local portal properties. So portal.properties is the primary, but portal-ext.properties overrides the values since it is included by the primary properties file.
Steven Edmunds
RE: "include-and-override" Meaning
November 21, 2012 11:28 AM
Answer

Steven Edmunds

Rank: New Member

Posts: 3

Join Date: November 20, 2012

Recent Posts

Thanks Shinn and David for the responses, but I'm still confused. Is Liferay using the word "override" backwards? By David's explanation the file that you include with the include-and-override property, is not the file that you override. Also in the link from Shinn it says, "...each portal instance can have its own overridden property file", but again that seems backwards, as why would each portal need an overridden property file?
David H Nebinger
RE: "include-and-override" Meaning
November 21, 2012 12:31 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11295

Join Date: September 1, 2006

Recent Posts

It's not Liferay's word, 'override'.

Follow the link to EasyConf and read the doco there for more information.
Steven Edmunds
RE: "include-and-override" Meaning
November 21, 2012 2:23 PM
Answer

Steven Edmunds

Rank: New Member

Posts: 3

Join Date: November 20, 2012

Recent Posts

Okay, thanks, I've got it now. I think EasyConf made a mistake when naming the property "include-and-override" instead of something like "include-and-override-with", and perhaps that mixed up the Liferay documentation writer causing him to use the word "overridden" where he seems to mean "overriding".