开发者

Maven embedded Tomcat version

开发者 https://www.devze.com 2022-12-10 13:08 出处:网络
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 thi

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!


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.


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.


These answers appear out of date. You can control the version.

http://mojo.codehaus.org/tomcat-maven-plugin/examples/adjust-embedded-tomcat-version.html

0

精彩评论

暂无评论...
验证码 换一张
取 消