Hi David, well first of all thanks so much for yours quick response. I have tried your code and it works fine for me. it seems that the <warSourceDirectory>webapp</warSourceDirectory> is dealing with the timestamps of the files correctly although I thought that the webapp would be the default webSourceDirectory. If the webSourceDirectory is not explicitly specified the file in the config folder of the WEb-Inf folder won't be overwriten if it has a newer timestamp than the file it should be overwritten with. Anyways thanks for your help I really appreciate it.
-------- Original-Nachricht -------- > Datum: Tue, 18 Mar 2008 13:53:47 +0100 > Von: David Delbecq <[EMAIL PROTECTED]> > An: Maven Users List <[email protected]> > Betreff: Re: overwriting external resources > En l'instant précis du 18/03/08 12:43, Dominik Heller s'exprimait en ces > termes: > > Hi i am pretty new to maven and encountered a problem by overwriting > some external resources. I am using maven 2.0.7 and the maven-war-plugin > 2.0.2. What I want to do is to overwrite a folder config in the WEB-INF > containing some files with an other folder config which is stored in an > external > resource folder until I build the project. > > In the end it looks pretty much like this: > > > > -src/main/ > > -Customer/config > > -web.xml > > -config.xml > > -... > > -webapp/WEB-INF > > -config/... > > -web.xml > > > > when building the project i want to use profiles to replace the web.xml > and the config foilder in the WEB-INF. For replacing the web.xml I am using > the <webXml> property but so far I didn't find a way to overwrite the > config folder in the WEB-INF. > > Any ideas someone?? > > > > thx in advance > > > Hi, we had similar requirement here. Here is our solution: > > in build plugins: > > > <plugin> > <artifactId>maven-war-plugin</artifactId> > <configuration> > <warSourceDirectory>webapp</warSourceDirectory> > <webResources> > <resource> > <!-- this is relative to the pom.xml directory --> > <directory>configSets/${config.configSet}</directory> > </resource> > </webResources> > </configuration> > </plugin> > > in profiles: > > <profile> > <id>user-x</id> > <activation> > <property> > <name>user</name> > <value>x</value> > </property> > </activation> > <properties> > <config.configSet>userX</config.configSet> > </properties> > </profile> > > We make our package using > > mvn package -Duser=x > > and it will override, in war, existing files with those found in > configSets/userX/ > > > -- > David Delbecq > Institut Royal Météorologique > Ext:557 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
