我刚刚将以下代码添加到我的pom.xml (在here上指定):
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<zipUrlInstaller>
<url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.zip</url>
</zipUrlInstaller>
</container>
</configuration>
</plugin>
</plugins>
</build>但是,当我运行mvn clean verify cargo:run时,我得到了以下结果:
No plugin found for prefix 'cargo' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]任何帮助都将不胜感激。
发布于 2011-06-11 22:32:46
您必须定义pluginGroup才能在命令行中使用缩写。
发布于 2016-12-12 19:51:59
另一个解决方案是指定完整的插件名称org.codehaus.cargo:cargo-maven2-plugin而不是cargo。
因为你将成为mvn clean verify org.codehaus.cargo:cargo-maven2-plugin:run
发布于 2021-10-27 21:10:26
这是我的配置:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.8.3</version>
<configuration>
<container>
<containerId>tomcat9x</containerId>
<type>embedded</type>
</container>
<deployables>
<deployable>
<type>war</type>
<location>${project.build.directory}/${project.build.finalName}.war</location>
<properties>
<context>/</context>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>https://stackoverflow.com/questions/6315628
复制相似问题