This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm using Maven 3.0.4. I have some environment specific properties files (e.g. dev_hibernate.cfg.xml), all of which located in my src/main/resources directory. When building my war, I would like these environment specific files removed and so I have this in my pom.xml file …
However, when I run "mvn clean package" the .xml and .properties files are still appearing in my WAR's WEB-INF/classes directory. Can anyone tell what is wrong with the expression above or if there is a better way to do this?
I'm going to take a guess that the WAR file has been created during the package phase before your ant tasks are run. Perhaps try running your ant tasks in the prepare-package phase.
Joined: Jul 02, 2008
Winner! Thanks, -
ps - Based on the profile used, I'm copying the files from my src/main/resources directory to the WEB-INF/classes directory. However, I don't want to include the other properties files for profiles that aren't used.