gpt4 book ai didi

maven - Cargo:run 如果指定了containerId,还需要指定containerUrl

转载 作者:行者123 更新时间:2023-11-28 22:54:57 28 4
gpt4 key购买 nike

我正在尝试通过 cargo 运行 tomcat。 Tomcat 已经安装。 cargo:deploy 工作正常,但是当我尝试 cargo:run 时出现以下错误

If you specify a containerId, you also need to specify a containerUrl.

如果我指定一个 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>

这是我的资料

<profile>
<id>developer-properties</id>
<properties>
<cargo.maven.containerId>tomcat7x</cargo.maven.containerId>
<container.home>C:/apache-tomcat-7.0.35</container.home>
</properties>
</profile>

根据 cargo 文件;类型“现有”应该使用现有的容器安装。我不认为我需要 containerURL 除非类型是“独立的”。我不明白为什么会收到 containerURL 错误。

关于类型的文档在这里:https://codehaus-cargo.github.io/cargo/Existing+Local+Configuration.html

最佳答案

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

If the plugin configuration defines a container with a standalone local configuration, it will create the configuration.

所以它可能忽略了您现有的本地配置。

关于maven - Cargo:run 如果指定了containerId,还需要指定containerUrl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30021805/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com