Tomcat Sysdeo Maven Plugin


I’m a stubborn fool, I refuse to stop using the Sysdeo Tomcat Eclipse Plugin to launch my web applications. Maybe I’m just too lazy to figure out how the Eclipse J2EE tools work, but I do know that the Sysdeo Tomcat Eclipse Plugin seems to do a good job of starting/stopping web applications in Eclipse and providing for the ability to replace bytecode at runtime.

The only problem is that the plugin is a PITA to use with Maven 2 without some sort of supporting tool. You see, here’s how this plugin works….there is a file “.tomcatplugin” which needs an explicit list of all the classpath entries to use for what it called the DevLoader (the specific magic that Sysdeo Tomcat uses to support bytecode replacement during runtime). The problem is that without some generating script, this file will constantly include provided libraries, and duplicates.

Anyone who is familiar with the Sysdeo Tomcat Eclipse plugin knows that screwing up this file can cause hours upon hours (upon days) of frustrating hardship. Simple things like including the JSP or Servlet JARs by mistake will cause cryptic errors which are impossible to diagnose. those of you who happen to use Maven 2 with Eclipse and the Sysdeo Tomcat plugin know what a PITA it is to have to constantly reconfigure your Tomcat DevLoader settings…

….Enter – the “Sysdeo Tomcat Eclipse Plugin Maven Plugin” (terrible name, huh?), this Maven 2 plugin will generate your .tomcatplugin and it will take into account Maven 2 dependency scopes like provided and test. Follow these directions…..All you have to do is:

  1. Add a plugin to your pom
  2. Configure the newest version of the maven-eclipse-plugin and add the tomcat nature
  3. run “mvn eclipse:eclipse sysdeo-tomcat:generate”