jenkinsdeploymentjbosscargo

How to point CARGO to Jar files to deploy on JBoss 7.*?


This is the console output from Jenkins when I attempt to deploy my application:

Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss     connector classes! Make sure the required JBoss JARs (or Maven dependencies) are    in CARGO's classpath.
    More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>   (JBoss5xRemoteDeployer.java:161)
at org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer.<init>(JBoss7xRemoteDeployer.java:41)
... 26 more
Caused by: java.lang.ClassNotFoundException: org.jboss.as.controller.client.ModelControllerClient
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:156)
... 27 more
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE

This is the content regarding CARGO in my POM file.

<plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>1.2.0</version>
            <configuration>
                <container>
                    <containerId>jboss7x</containerId>
                    <type>remote</type>
                </container>
            </configuration>
            <executions>
                <execution>
                    <id>deploy</id>
                    <phase>install</phase>
                    <goals>
                        <goal>redeploy</goal>
                    </goals>
                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.hostname>localhost</cargo.hostname>
                            <cargo.jboss.management.port>19999</cargo.jboss.management.port>
                        </properties>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.as</groupId>
                    <artifactId>jboss-as-controller-client</artifactId>
                    <version>7.1.1.Final</version>
                </dependency>
            </dependencies>
        </plugin>

I've tried all the other solutions I've found online and none of them do the trick. Any ideas?


Solution

  • I solved this issue by copying all jar files from JBoss modules folder into the jenkins/plugins/deploy/WEB-INF.