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]