« Return to Thread: How can I deploy to running JBoss 7.1 using Cargo?

Re: How can I deploy to running JBoss 7.1 using Cargo?

by laredotornado :: Rate this Message:

| View in Thread

Hi,

Ah, once again your advice has proved invaluable.  Using the link and your changes, I got rolling with the below configuration ...

                        <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.0.Final</version>
                                        </dependency>
                                </dependencies>
                        </plugin>
                       
Problem now is, although I can run my build and I can get a build success message from Cargo ...

[INFO] --- cargo-maven2-plugin:1.2.0:redeploy (deploy) @ event-maven ---
[INFO] [DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jboss:jar:1.2.0 for container jboss7x
Mar 2, 2012 2:36:22 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Mar 2, 2012 2:36:22 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Mar 2, 2012 2:36:22 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.2.GA
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

The war file is not present in my $JBOSS_HOME/standalone/deployments directory.  Is there anything else I should be aware of?

Thanks, - Dave


S. Ali Tokmen wrote:
Hi Dave

You can find a full sample in here:
http://cargo.codehaus.org/Maven2+Archetypes#Maven2Archetypes-remote

In your case:

  * The container type is not specified correctly, it should be runtime
  * Version 1.1.3 is not a good idea, you should try with the latest and
    greatest 1.2.0

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

GSM (ch): +41 79 207 29 22 [Swisscom]
GSM (fr): +33 7 70 10 33 79 [Virgin Mobile]
GSM (tr): +90 555 266 52 73 [Avea]

My AIM, ICQ, MSN Messenger and Yahoo IM
contact details are on http://contact.ali.tokmen.com


On 2012/03/01 23:48, laredotornado wrote:
> Hi,
>
> I'm using Maven 3.0.3 and trying to deploy my app to a running JBoss 7.1
> server, installed locally.  What dependencies do I need to include to make
> this happen?  Here is my current Cargo configuration ...
>
> <plugins>
> <plugin>
> <groupId>org.codehaus.cargo</groupId>
> <artifactId>cargo-maven2-plugin</artifactId>
> <version>1.1.3</version>
> <configuration>
> <container>
> <containerId>jboss7x</containerId>
> <type>remote</type>
> </container>
> </configuration>
> <executions>
> <execution>
> <id>deploy</id>
> <phase>install</phase>
> <goals>
> <goal>deploy</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
> And here is the error message I'm getting ...
>
> [ERROR] Failed to execute goal
> org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deploy (deploy) on project
> event-maven: Execution deploy of goal
> org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deploy failed: Failed to create
> deployer with implementation class
> org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer for the parameters
> (container [id = [jboss7x]], deployer type [remote]).
> InvocationTargetException: Cannot locate the JBoss connector classes! Make
> sure the required JBoss JARs (or Maven dependencies) are in CARGO's
> classpath.
>
> Thanks for your guidance, - Dave

 « Return to Thread: How can I deploy to running JBoss 7.1 using Cargo?