我正在使用Maven 3.0.3和Maven-Cargo插件1.1.3以及Tomcat 6.0.33。如何使用Maven-Cargo将现有的WAR项目部署到已安装的Tomcat容器?我有这样的配置...
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<wait>false</wait>
<container>
<containerId>tomcat6x</containerId>
<type>installed</type>
<!-- The home folder for your local Tomcat -->
<home>${CATALINA_HOME}</home>
</container>
<configuration>
<type>existing</type>
<home>${CATALINA_HOME}</home>
</configuration>
<deployer>
<!-- You have to again specify that the type for the deployer -->
<type>local</type>
<deployables>
<!-- This deployable specifies the webapp you want to deploy -->
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>${project.packaging}</type>
</deployable>
</deployables>
</deployer>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>但是当我跑的时候
mvn cargo:start clean install -DCATALINA_HOME=$CATALINA_HOMEWAR文件并没有部署到我已经在运行的Tomcat实例中(当我的集成测试在Tomcat服务器上运行时,我会得到404)。
谢谢你的帮助,-戴夫
发布于 2011-10-25 04:29:36
我正在使用Maven Tomcat插件在运行的Tomcat实例上部署web应用程序。mvn tomcat:部署..也许这对你也是有效的?更多详细信息请访问plugin's website
https://stackoverflow.com/questions/7881328
复制相似问题