Maven Cargo:如果指定containerId,则还需要指定containerUrl
我正在试着让tomcat通过货物。Tomcat已经安装。cargo:deploy工作正常,但当我尝试cargo:run时,会出现以下错误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
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进行远程部署。