Hi all,
It took me weeks to figure this one out. The crux of the issue is that
both of these plugins do to a copy of the src/main/webapp directory. For
example if you run />mvn resources:resources on your project it runs as
expected, including if you are doing any filtering in the webapp
directory. But, and here is where I had the problem, if you run />mvn
war:war it does the first copy(and filter) of the webapp resource folder
by the resources plugin. Then the war plugin its self does a second copy
of the webapp resource folder overwriting what the resource/filter
plugin just did, in short undoing your filtering. To get around this I
did the following:
Index: src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
(revision 373784)
+++ src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
(working copy)
@@ -258,7 +258,7 @@
try
{
- copyResources( getWarSourceDirectory(), webappDirectory,
getWebXml() );
+ //copyResources( getWarSourceDirectory(), webappDirectory,
getWebXml() );
buildWebapp( getProject(), webappDirectory );
}
I know there are probably a million better ways to do this, but for now
this works for me.
-ScottTavares-
Sr. Consultant
SCTDataySystems
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]