我使用的是Maven 3.0.3。有没有办法使用Maven Cargo插件来启动嵌入式Tomcat服务器?现在,似乎我必须自己先安装它。当我尝试将容器类型更改为"embedded“时,我得到了这个错误...
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.2:run (default-cli) on project jx: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.2:run failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [tomcat6x], type = [embedded]], configuration type [standalone]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it? -> [Help 1]我使用的配置是...
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<type>embedded</type>
</container>
<configuration>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.logging>high</cargo.logging>
</properties>任何帮助都是非常感谢的。我不使用Maven嵌入式Tomcat插件的原因是它不支持多个部署工件。谢谢,-戴夫
发布于 2011-08-09 08:48:43
tomcat6上不支持From cargo documentation嵌入式容器。它只是jetty的supported。
发布于 2011-08-09 23:43:20
也许t7mp插件会是另一种选择?Overview of the configuration options展示了如何部署多个webapps以及如何配置共享库。据我所知,当前版本在maven central中不可用,因此您必须从github下载它,然后自己构建和部署。
在运行时,它使用指定的tomcat6或7版本的库填充target/tomcat文件夹,并使用同一jvm中的新类加载器引导tomcat。
https://stackoverflow.com/questions/6987408
复制相似问题