如何安装 tomcat maven 插件?
How to install tomcat maven plugin?
我正在尝试 运行 基本的 CXF maven 原型。
我刚刚尝试使用 :
手动安装 tomcat7-maven-plugin-2。2.jar
mvn -X install:install-file -Dfile=/tmp/path/tomcat7-maven-plugin-2.2.jar -DgroupId=org.apache.tomcat.maven -DartifactId=tomcat7-maven-plugin -Dversion=2.2 -Dpackaging=jar
这导致:
[INFO] Installing /tmp/path/tomcat7-maven-plugin-2.2.jar to /home/userxxx/.m2/repository/org/apache/tomcat/maven/tomcat7-maven-plugin/2.2/tomcat7-maven-plugin-2.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jan 23 17:50:42 CET 2015
[INFO] Final Memory: 4M/179M
[INFO] ------------------------------------------------------------------------
但是当我尝试通过 :
在我的项目中调用它时
mvn clean install tomcat:run-war
它说:
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin '**org.codehaus.mojo**:tomcat-maven-plugin' does not exist or no valid version could be found
你知道为什么 maven 正在寻找 "org.codehaus.mojo" groupId 而不是 "org.apache.tomcat.maven" 吗?
我知道它之前托管在 "org.codehaus.mojo",所以这是一个错误吗?
我应该在这个 groupId 中安装插件吗?
好的,我明白了,CXF原型中的注释是错误的:
<!-- mvn clean install tomcat:run-war to deploy
Look for "Running war on http://xxx" and
"Setting the server's publish address to be /yyy"
in console output; WSDL browser address will be
concatenation of the two: http://xxx/yyy?wsdl
-->
应该说 mvn clean install **tomcat7**:run-war to deploy
对应他们在这个原型中使用的插件。
我正在尝试 运行 基本的 CXF maven 原型。
我刚刚尝试使用 :
手动安装 tomcat7-maven-plugin-2。2.jarmvn -X install:install-file -Dfile=/tmp/path/tomcat7-maven-plugin-2.2.jar -DgroupId=org.apache.tomcat.maven -DartifactId=tomcat7-maven-plugin -Dversion=2.2 -Dpackaging=jar
这导致:
[INFO] Installing /tmp/path/tomcat7-maven-plugin-2.2.jar to /home/userxxx/.m2/repository/org/apache/tomcat/maven/tomcat7-maven-plugin/2.2/tomcat7-maven-plugin-2.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jan 23 17:50:42 CET 2015
[INFO] Final Memory: 4M/179M
[INFO] ------------------------------------------------------------------------
但是当我尝试通过 :
在我的项目中调用它时mvn clean install tomcat:run-war
它说:
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin '**org.codehaus.mojo**:tomcat-maven-plugin' does not exist or no valid version could be found
你知道为什么 maven 正在寻找 "org.codehaus.mojo" groupId 而不是 "org.apache.tomcat.maven" 吗?
我知道它之前托管在 "org.codehaus.mojo",所以这是一个错误吗?
我应该在这个 groupId 中安装插件吗?
好的,我明白了,CXF原型中的注释是错误的:
<!-- mvn clean install tomcat:run-war to deploy
Look for "Running war on http://xxx" and
"Setting the server's publish address to be /yyy"
in console output; WSDL browser address will be
concatenation of the two: http://xxx/yyy?wsdl
-->
应该说 mvn clean install **tomcat7**:run-war to deploy
对应他们在这个原型中使用的插件。