As discussed here (http://old.nabble.com/Remote-deploy-on-Jboss-6-tt30748076.html) I was looking for a way to deploy an application on a Jboss Cluster using Cargo.
I made some implementations and generated a cargo version where I'm able to acomplish this task.
I've attached a path with the changes and will explain here what I did to see if its ok:
Changed the constructor of the class org.codehaus.cargo.tools.jboss.JBossDeployer to receive an instance of org.codehaus.cargo.container.configuration.Configuration too.
Changed, in class org.codehaus.cargo.tools.jboss.JBossDeployer, the methods 'deploy' and 'undeploy' to instanciate a profile taking into account some container configurations:
1)cargo.jboss.configuration -> specify the profile
2)cargo.jboss.clustered -> if true deploy on farm dir
The 'undeploy' method, in addition of stopping the application also delete the file. That way Jboss will remove the application from all cluster nodes. In case of someone want only to stop the application it still possible using the cargo:deployer-stop goal.
Changed the class org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer to instantiate the org.codehaus.cargo.tools.jboss.JBossDeployer passing an instance of org.codehaus.cargo.container.configuration.Configuration at the constructor.