使用 Maven 插件时,我们可以使用以下命令从命令行启动 Tomcat:
mvn tomcat:run
如果我的机器上有 2 个独立的 Tomcat 安装(例如 Tomcat 6.x 和 7.x),有没有办法可以指定要运行哪一个 :run
???
编辑1:
根据西里尔的建议,我尝试过:
mvn tomcat6:run 和 mvn tomcat7:run
我得到了这个错误:
[ERROR] No plugin found for prefix 'tomcat6' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/chitteb/.m2/repository), central (http://repo1.maven.org/maven2)] -> [Help 1]
最佳答案
我相信它将运行 CATALINA_BASE
和 CATALINA_HOME
环境变量中指定的环境变量。
关于tomcat - 如何向 'mvn tomcat:run'命令指定Tomcat实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10409398/