5

I have just added the following code to my pom.xml (as specified on 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>

However, when I run mvn clean verify cargo:run I am getting the following :

No plugin found for prefix 'cargo' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]

Any help will be appreciated.

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
Andrew
  • 2,663
  • 6
  • 28
  • 50
  • Why didn't you configure the cargo-maven2-plugin to run in the pre-integration test phase instead of calling it via command line manually. – khmarbaise Jun 11 '11 at 14:33

4 Answers4

5

Another solution is specify full plugin name org.codehaus.cargo:cargo-maven2-plugin instead cargo.

For you will be mvn clean verify org.codehaus.cargo:cargo-maven2-plugin:run

BioQwer
  • 61
  • 1
  • 3
5

You have to define the pluginGroup to be able to use the abbreviation on command line.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
0

This is my configuration:

        <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>
Dave Rincon
  • 308
  • 3
  • 10
0

cargo-maven2-plugin has been replaced by cargo-maven3-plugin. See my working config here: https://stackoverflow.com/a/76372717/1384839

slonik
  • 1,144
  • 11
  • 13