Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven Cargo:如果指定containerId,则还需要指定containerUrl_Maven_Tomcat_Tomcat7_Maven 3_Cargo - Fatal编程技术网

Maven Cargo:如果指定containerId,则还需要指定containerUrl

Maven Cargo:如果指定containerId,则还需要指定containerUrl,maven,tomcat,tomcat7,maven-3,cargo,Maven,Tomcat,Tomcat7,Maven 3,Cargo,我正在试着让tomcat通过货物。Tomcat已经安装。cargo:deploy工作正常,但当我尝试cargo:run时,会出现以下错误 If you specify a containerId, you also need to specify a containerUrl. [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2- plugin:1.4.13:run (default-cli) on projec

我正在试着让tomcat通过货物。Tomcat已经安装。cargo:deploy工作正常,但当我尝试cargo:run时,会出现以下错误

If you specify a containerId, you also need to specify a containerUrl.
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-    
plugin:1.4.13:run (default-cli) on project ctm: Unable to parse configuration   
of mojo org.codehaus.cargo:cargo-maven2-plugin:1.4.13:run for parameter 
containerURL: Cannot find 'containerURL' in class org.codehaus.cargo.maven2.configuration.Container
...
如果我指定一个containerURL,我会得到以下错误

If you specify a containerId, you also need to specify a containerUrl.
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-    
plugin:1.4.13:run (default-cli) on project ctm: Unable to parse configuration   
of mojo org.codehaus.cargo:cargo-maven2-plugin:1.4.13:run for parameter 
containerURL: Cannot find 'containerURL' in class org.codehaus.cargo.maven2.configuration.Container
...
这是我的Maven配置

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.4.13</version>
    <configuration>
        <container>
            <type>existing</type>
            <containerId>${cargo.maven.containerId}</containerId>
             <home>${container.home}</home>
        </container>
        <configuration>
            <type>existing</type>
            <home>${container.home}</home>
        </configuration>
        <deployables>
            <deployable>
                <groupId>${project.groupId}</groupId>
                <artifactId>${project.artifactId}</artifactId>
                 <type>war</type>
                 <properties>
                     <context>example</context>
                 </properties>
             </deployable>
         </deployables>
        </configuration>
        <executions>
            <execution>
            <id>run</id>
            <configuration>
                <configuration>
                    <type>existing</type>
                </configuration>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>

org.codehaus.cargo

我认为文件不清楚。我认为
cargo:run
总是使用独立的本地配置,因此描述

如果插件配置定义了具有独立 本地配置,它将创建配置


因此,它可能忽略了您现有的本地配置。

我认为
找不到“containerURL”
问题只是区分大小写的问题,尝试
containerURL
我仍然会遇到与containerURL相同的错误。我最终使用maven antrun插件启动现有的tomcat和cargo进行远程部署。