maven利用cargo配置tomcat7x报错,求会的朋友帮忙看下

jianghujian1 2014-10-23 12:56:41
错误如下:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HelloWeb 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.2.3:run (default-cli) @ HelloWeb ---
[INFO] Downloading: https://repo.maven.apache.org/maven2/xmlunit/xmlunit/1.2/xmlunit-1.2.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/jmock/jmock/1.2.0/jmock-1.2.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/jmock/jmock-cglib/1.2.0/jmock-cglib-1.2.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/commons-vfs/commons-vfs/1.0/commons-vfs-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.946 s
[INFO] Finished at: 2014-10-23T12:45:30+08:00
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project HelloWeb: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run failed: Cannot create configuration. There*s no registered configuration for the parameters (container [id = [tomcat7x], type = [installed]], configuration type [existing]). Actually there are no valid types registered for this configuration. Maybe you*ve made a mistake spelling it? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException




pom.xml核心配置如下:


<build>
<finalName>hw</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<home>D:\tomcat7.0.52</home>
</container>
<configuration>
<type>existing</type>
<home>D:\tomcat7.0.52</home>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
...全文
831 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
蔡大东 2014-11-20
  • 打赏
  • 举报
回复
楼主解决了吗?
howsun_zh 2014-11-20
  • 打赏
  • 举报
回复
利用cargo插件集成Tomcat有两种方式: 1、Maven将项目自动部署到远程Tomcat里 2、将Tomcat嵌入到Maven项目中来 从楼主的配置来看,是第2种方式,请检查<type>existing</type>是否有误?尝试下type为standalone看看。还有<container>中home实际上${CATALINA_HOME},而<configuration>里的home是嵌入Tomcat的home(例如${project.build.directory}/tomcat7x),不要搞混了。 最后提供两个参考: 1、CARGO插件的官方网址:http://cargo.codehaus.org/ 2、我的一份PPT:http://download.csdn.net/detail/zhangjihao/8179303

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧