You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Scott Tavares <st...@thecityside.com> on 2006/01/31 11:19:24 UTC
Conflict between war and resources plugins
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
stavares@thecityside.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org