我的 pom.xml 中有以下内容
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<wait>true</wait>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
</container>
<configuration>
<type>remote</type>
<properties>
<cargo.tomcat.manager.url>http://<myhost>:8080/manager</cargo.tomcat.manager.url>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>password</cargo.remote.password>
</properties>
</configuration>
<deployer>
<type>installed</type>
<deployables>
<deployable>
<groupId>com.mycode</groupId>
<artifactId>myartifact</artifactId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deployer-deploy</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>deployer-undeploy</goal>
</goals>
</execution>
<execution>
<id>verify-deploy</id>
<phase>install</phase>
<goals>
<goal>deployer-deploy</goal>
</goals>
</execution>
<execution>
<id>clean-undeploy</id>
<phase>pre-clean</phase>
<goals>
<goal>deployer-undeploy</goal>
</goals>
</execution>
</executions>
</plugin>
在此之后我发出命令mvn deploy
但是我收到以下错误:
[错误] 无法在项目 fismacm 上执行目标 org.codehaus.cargo:cargo-maven2-plugin:1.3.1:deployer-deploy (start-container):执行目标 org.codehaus.cargo:cargo-maven2 的启动容器-plugin:1.3.1:deployer-deploy failed: 无法创建配置。参数没有注册配置(容器 [id = [tomcat6x],类型 = [remote]],配置类型 [remote])。此配置的有效类型是:
http://<myhost>:8080/manager
我可以从我的浏览器成功访问。我正在运行的tomcat版本是7。