[xwiki-devs] best way to override xwiki.cfg properties in my source?

Vincent Massol vincent at massol.net
Mon Jun 2 11:29:53 CEST 2008


Hi Paul,

On Jun 2, 2008, at 11:17 AM, Paul Libbrecht wrote:

>
> Hello list,
>
> as indicated on:
>  http://www.nabble.com/my-attempt-at-building-a-development-curriki-to17569285.html
>
> I am using a simple maven install to build curriki which is very nice.
> Within the process both xwiki.cfg and hibernate.cfg.xml are built  
> and I could override these with changes in the pom.xml.
>
> Do I have a chance to override these somewhere else?

yes there is. This is exactly what is done in
http://svn.xwiki.org/svnroot/xwiki/xwiki-products/curriki/trunk/web/pom.xml 
  (for example)

To summarize:
* we have generic templates defined in platform tools/configuration  
(*.vm files)
* these depend on properties that are defined in the top level pom and  
overridden in products (as is done in the URL I've pasted above)

Thus if you want to override them further for your specific need,  
right now you'd need to create a profile in the curriki's pom.xml and  
override the remote resources plugin's configuration.

You should read also
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

To improve  on that (i.e. in order not to require modifying any file  
under source control), we could simply create maven properties and use  
them in the remote resource plugin's configuration so that these  
properties can be overiden in either your profiles.xml file or in your  
settings.xml file.

That's very easy and a patch would be most welcome.

Thanks
-Vincent



More information about the devs mailing list