That's probably because your war's sourceDirectory is src/main/webapp. I always put filtered resources in src/main/webResources and non-filtered everything else goes in src/main/webapp.
Matt > -----Original Message----- > From: mschipperheyn [mailto:m.schipperh...@gmail.com] > Sent: Friday, January 20, 2012 6:00 AM > To: users@maven.apache.org > Subject: war:war overrides webapp content from webapp resources > > Hi, > > I'm running into a little issue in war:war that has a workaround but > I'm > still bothered by it: > > I'm trying to filter stuff from src/main/webapp/ > This works > However, my filtered result is overwritten in the last part of resource > copying > > [INFO] Processing war project > [INFO] Copying webapp webResources > [d:\projects\project\web\src/main/webapp] > to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT] > [INFO] Copying webapp webResources > [d:\projects\project\web\target/classes] > to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT] > [INFO] Copying webapp webResources > [d:\projects\project\web\src/main/webapp/WEB-INF] to > [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT] > [INFO] Copying webapp webResources > [d:\projects\project\web\../core/target] > to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT] > [INFO] Copying webapp resources > [d:\projects\project\web\src\main\webapp] > > It's the last line that is the problem because it overwrites the > filtered > webResources copy in an unfiltered way. I'm just wondering where it > comes > from and how to change it > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-war-plugin</artifactId> > <version>2.2-SNAPSHOT</version> > <configuration> > <webResources> > <resource> > <directory>src/main/webapp</directory> > <excludes> > <exclude>**/Thumbs.db</exclude> > <exclude>**/.svn/**</exclude> > <exclude>**/*-min.js</exclude> > <exclude>**/*-min.css</exclude> > </excludes> > </resource> > <resource> > <directory>target/classes</directory> > <targetPath>WEB-INF/classes</targetPath> > </resource> > <resource> > <directory>../core/target</directory> > <includes> > <include>${parent.artifactId}-core- > ${version}.jar</include> > </includes> > <targetPath>WEB-INF/lib</targetPath> > </resource> > </webResources> > <packagingExcludes></packagingExcludes> > > <warSourceExcludes>**/Thumbs.db,*.js,*.css</warSourceExcludes> > </configuration> > </plugin> > <resources> > <resource> > <directory>src/main/resources</directory> > <excludes> > <exclude>ApplicationResources_*.properties</exclude> > <exclude>applicationContext-*.xml</exclude> > </excludes> > <filtering>true</filtering> > </resource> > <resource> > <directory>src/main/resources</directory> > <includes> > <include>applicationContext-resources.xml</include> > </includes> > </resource> > </resources> > > Cheers, > Marc > > > -- > View this message in context: http://maven.40175.n5.nabble.com/war-war- > overrides-webapp-content-from-webapp-resources-tp5160326p5160326.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org ______________________________________________________________________ This message, including any attachments, is confidential and contains information intended only for the person(s) named above. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply email and permanently delete the original transmission from all of your systems and hard drives, including any attachments, without making a copy. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org