如何配置Maven Cargo以使用嵌入式Tomcat 6服务器? [英] How do I configure Maven Cargo to use an embedded Tomcat 6 server?

查看:121
本文介绍了如何配置Maven Cargo以使用嵌入式Tomcat 6服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Maven 3.0.3.有什么方法可以使用Maven Cargo插件启动嵌入式Tomcat服务器吗?现在,看来我必须先自己安装它.尝试将容器类型更改为嵌入式"时出现此错误...

I'm using Maven 3.0.3. Is there a way I can use the Maven Cargo plugin to spin up an embedded Tomcat server? Right now, it seems I have to install it myself first. I get this error when I try and change the container type to "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]

我使用的配置是...

The configuration that I used was ...

                            <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插件的原因是它不支持多个部署工件.谢谢,-戴夫

Any help is appreciated. The reason I'm not using the Maven embedded Tomcat plugin is that it doesn't support multiple deployment artifacts. Thanks, - Dave

推荐答案

来自货物文档 tomcat6不支持嵌入式容器.

From cargo documentation Embedded Container is not supported on tomcat6. It is only supported for jetty.

这篇关于如何配置Maven Cargo以使用嵌入式Tomcat 6服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆