Tomcat Maven Plugin

maven-tomcatMaven is a great tool. Sometimes is not the most pain-less tool on earth, but there’s a reason if we use the term “dependency hell”. So, when you’re trying to manage such a thing like “dependencies”, especially considering that almost everybody can put their artifacts on maven central, we can surely state that it’s doing his job.

Maven is also all about plugins. One of the most useful for a web applications developer is the:
Tomcat Maven Plugin


This little xml snippet show some interesting things.

  • you can easily configure the context path and the listen port
  • you can add specific dependencies only for the plugin, useful for the usually “provided” libraries excluded from war package

From the command line all you have to do is:

mvn tomcat7:run

Leave a Reply

Your email address will not be published. Required fields are marked *