我的 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
但是我收到以下错误:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.3.1:deployer-deploy (start-container) on project fismacm: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.3.1:deployer-deploy failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [tomcat6x], type = [remote]], configuration type [remote]). Valid types for this configuration are:
我可以成功访问http://<myhost>:8080/manager
从我的浏览器。我运行的 tomcat 版本是 7。
最佳答案
@maba : 有两种类型标签
<container>
<type></type>
</container>
在那里你可以有嵌入式/远程
然后
<configuration>
<type>runtime</type>
</configuration>
实际上你可以在哪里获得你提到的值:独立的、现有的或运行时的
@birdy:我面临着同样的问题:如果你摆脱了它,请提及它 :) 顺便说一下,日志错误还为你提供了可能的类型,但你没有将其粘贴到你的帖子。
关于tomcat - 参数没有注册配置(container [id = [tomcat7x],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13383904/