tomcat - 参数没有注册配置(container [id = [tomcat7x]

标签 tomcat maven maven-plugin maven-cargo

我的 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/

相关文章:

使用 Maven 构建的 Java Spring Boot Web App(hello world) 运行时无法启动 Tomcat

java - 强制 IDEA 使用正确的源代码版本

spring-boot - Spring boot Flyway Jooq Code gen maven插件顺序

Java 运行时异常 : "could not find writer for content type" when building uberjar and zip package

maven - 从 MavenProject 获取 project.build.directory?

maven - 在默认目标之前运行插件目标

java - 从 servlet 访问 osgi 包类

tomcat - 部署Struts2项目

java - Tomcat,引用静态变量帮助生成wsdl

java - tomcat7不会在启动时运行