The \"install\" goal copies the artifact to the target directory and to the local repository.
How can I tell Maven to copy it also to a given directory
If you want to copy file to a webserver (local or distant) you can use Maven upload plugin :
com.atlassian.maven.plugins
maven-upload-plugin
1.1
${project.build.directory}/${project.build.finalName}.${project.packaging}
${jboss.deployDir}
${jboss.host}
${jboss.deployUrl}
And to configure parameters in a smart way, I use maven profiles :
developpement
localhost
appli/jboss-4.0.4.GA/server/default/deploy/
file://C:/
validation
ENV_val
/home/envval/jboss/server/default/deploy/
scp://PROJECT_LAN_HOST
I've created an "ant launcher", to use it by clicking under Eclipse ant view :
But you can simply run it on a command line :
mvn upload:upload -Pdeveloppement
By the way, for distant deployment, you may need a login password for scp to work. You have to add them to you Maven settings.xml file :
...
ENV_val
login
password
...