Hey David,
so I have tried to reproduce your test scenario but for some reason I still
have the same problem. In the following is the code of pom.xml:
folder structure:
files to copy:::
src/main/Customer/web.xml
src/main/Customer/WEB-INF/config/cd.xml
src/main/Customer/WEB-INF/config/config.properties
files to overwrite:::
src/main/webapp/WEB-INF/config/cd.xml
src/main/webapp/WEB-INF/config/config.properties
<profile>
<id>customer1</id>
<properties>
<config.setPath>Customer</config.setPath>
<webXML>src/main/Customer/web.xml</webXML>
</properties>
</profile>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<webXml>${webXML}</webXml>
<directory>src/main/webapp</directory>
<webResources>
<resource>
<directory>src/main/${config.setPath}</directory>
</resource>
</webResources>
</configuration>
</plugin>
Well right now I can't see any remarkable difference between your code and
mine, have you tried out what happens if you don't use the
<warSourceDirectory>webapp</warSourceDirectory> and especially if it still
works correct if you have two files in your default WEB-INF but you only want
to overwrite one of the files?
thx in advance
-------- Original-Nachricht --------
> Datum: Thu, 20 Mar 2008 08:35:38 +0100
> Von: David Delbecq <[EMAIL PROTECTED]>
> An: Maven Users List <[email protected]>
> Betreff: Re: overwriting external resources
> En l'instant précis du 19/03/08 10:10, Dominik Heller s'exprimait en ces
> termes:
> > Hello there,
> > well it seems that i was a little bit to fast to announce my success. So
> the thing is, when a file X in the WEB-INF/config folder has been changed
> more recently then the file I want to overwrite the file X with then it
> just won't do it. The reason why I thought it would work is because my pom is
> located in tzhe very top folder of the project and so by using
> <warSourceDirectory>webapp</warSourceDirectory> a new folder would be
> created. Any idea
> someone how to force maven to overwrite the files???
> > thx in advance.
> >
> Tested here:
>
> webapp/WEB-INF/Domain.xml , date of 20-03-2008
> configSet/user/WEB-INF/Domain.xml, date of 04-03-2008
>
> pom.xml:
>
> <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>
> ....
> <profiles>
> <profile>
> <id>build-user</id>
> <activation>
> <property>
> <name>type</name>
> <value>user</value>
> </property>
> </activation>
> <properties>
> <config.configSet>user</config.configSet>
> <!-- other unrelated config values -->
> </properties>
> </profile>
> </profiles>
>
> Result after mvn clean package:
> ls -l target/intranet-1.0-SNAPSHOT/WEB-INF/Domain.xml
> -rw-r--r-- 1 delbd delbd 36757 2008-03-04 10:38
> target/intranet-1.0-SNAPSHOT/WEB-INF/Domain.xml
> The correctly the "old" configSet file that override the more recent
> general file.
>
> --
> David Delbecq
> Institut Royal Météorologique
> Ext:557
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]