I couldn\'t find any clear answer about how to deploy simple Maven based project to remote GlassFish server via maven like
mvn package xxx:deploy
As far as I know and could find around, only Cargo delivers (or deploys, in this case).
This is an example tested as working on a Maven OSGi WAR project:
...
org.codehaus.cargo
cargo-maven2-plugin
1.1.2
glassfish3x
remote
runtime
myhostname
myusername
mypassword
org.glassfish.deployment
deployment-client
3.2-b06
As you can see, the trick lies in the deployment-client
dependency.
For the sake of completeness, you then just mvn package cargo:deploy
and Bob's your uncle.