I have problem using Maven Tomcat7 plugin to produce JAR archives with embedded Tomcat7 instance. Here is my pom.xml
snippet:
When I rm the old dir .extract/
created by last java -jar xx-war.jar
,
it OK.
And I use version 2.0, I think other version also work.
Remove the path from the configuration. And use 2.1 version of the tomcat plugin. Making those two changes in my pom file fixed a similar issue for me.
Also I had cleaned the $M2_REPO/org/apache
folder prior to rerunning.
This is indeed a bug in the tomcat7 maven plugin version 2.2: https://issues.apache.org/jira/browse/MTOMCAT-263
Use version 2.1 or wait for 2.3 to be released.