quote from plugin usage page while using maven :
<project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <webappDirectory>/sample/servlet/container/deploy/directory</webappDirectory> </configuration> </plugin> </plugins> </build> ... </project>
How to clear the contents of a directory defined in <webappDirectory>/sample/servlet/container/deploy/directory</webappDirectory> before blowing up a war file?
In my experience, a folder defined as webappDirectory will not be emptied, and therefore will have unrelated files that were part of webapp.
It will be great if I can add something to the current im command currently used to clear webappDirectory, something like this:
mvn -o clean <cleanWebappDirectory here?> install war:exploded
Thanks!
source share