I have trouble deploying to a remote JBoss server using the cargo-maven2 plugin from my local PC. I have posted on the cargo newsgroup and received this answer:
"Your configuration looks good. I've just checked the source code the JBoss remote deployer (JBossRemoteDeployer.java class) and there are 2 things:
We're using the JBoss JMX deployer which requires the deployable to be deployed to be present on the server filesystem.
The location used by our JMX deployer currently uses the same path on the local filesystem and on the server one. This is a bad limitation (I'm surprised nobody raised this before). I'd suggest you create a JIRA issue for this.
The current solution I can think of would be to create a JBossDeployable class that extends Deployable and adds a setRemoteFile(String) method. For a m2 user this would mean configuring it like this:
However we really need to find a way to deploy a local file to a remote JBoss server. This would remove the need for this JBossDeployable class and would be much easier.
I also think there should be an improvement to this plugin to allow remote deployments from local PCs.