0
我想在Maven的預集成測試階段(不同端口)啓動一個用於測試目的的新本地Tomcat實例並在那裏運行測試。然後,如果測試通過,我想做一個貨物:重新部署到遠程Tomcat實例。儘管如此,我仍然遇到問題。如果我做我是否可以重新部署到遠程Tomcat實例並啓動本地測試實例
mvn org.codehaus.cargo:cargo-maven2-plugin:run -Dcargo.maven.containerId=tomcat8x -Dcargo.maven.containerUrl=https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.36/bin/apache-tomcat-8.0.36.zip -Dcargo.maven.type=standalone
我得到
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.19:run (default-cli) on project atf-relay-server: Execution default-cli of goal org.co
dehaus.cargo:cargo-maven2-plugin:1.4.19:run failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [tomcat
8x], type = [installed]], configuration type [runtime]). Valid types for this configuration are:
[ERROR] - standalone
[ERROR] - existing
[ERROR] -> [Help 1]
我對貨物的pom.xml中(只指定遠程實例):
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.19</version>
<configuration>
<container>
<containerId>tomcat8x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>localhost</cargo.hostname>
<cargo.servlet.port>9990</cargo.servlet.port>
<cargo.remote.username>user</cargo.remote.username>
<cargo.remote.password>pass</cargo.remote.password>
</properties>
</configuration>
<deployer>
<type>remote</type>
</deployer>
</configuration>
</plugin>
什麼是實現這一目標的正確方法是什麼?