Wednesday, January 2, 2013

How to run Tomcat7 Maven plugin

Yesterday when I studied Spring MVC showcase I found if you run "mvn tomcat:run", the async samples would not be successful. When I checked "pom.xml", I found it used old version Tomcat Maven plugin.

Loading ....

Then I change it to latest Tomcat Maven plugin. The artifact id is tomcat7-maven-plugin. (You can get it on search.maven.org, so I will not show the code.). Then run "mvn tomcat:run", but still failed. I found this plugin still use Tomcat6, not Tomcat7. Later, I tried "mvn tomcat7:run". Then I found this time the plugin used Tomcat7 run the application. So when you use Tomcat7 Maven plugin, you have to run "mvn tomcat7:run".

No comments:

Post a Comment