views:

223

answers:

2

Is there a way to control the Maven embedded Tomcat version?

mvn tomcat:run

This command will run a Tomcat 6.0.16 instance. I'd like to run a 5.5 version of Tomcat. Is there a way to configure this? Searching the plugin docs didn't help...

Thanks!

+2  A: 

Maybe it would be easier for you to use the Cargo plugin. You will then be able to change the Tomcat you want to run.

romaintaz
+3  A: 

No, there is no real way to configure the Tomcat version with the tomcat-maven-plugin. Actually, Tomcat 6 support is due to MOJO-1106 and was added in the version 1.0-alpha-2 of the plugin (see revision r7348), in previous versions and revisions, the plugin was using Tomcat 5.5.15. The version 1.0-alpha-1 is available in the repo so you could give it a try. But I didn't check and can't say if it could be impacted by any major issue.

If this option doesn't work and if you really want finer control, then it would be better to use Cargo as pointed out by romaintaz.

Pascal Thivent
Thanks, I'll have a look at Cargo
Ran