Is there a 'correct' or common way of copying the latest release build from a maven repo to a server?
I have only fairly recently started using Maven (2.2.1), and I have Artifactory running on the local network, which is where my release versions deploy to.
Currently I have made a dodgy Maven plugin that scp's a release version .jar or .war file to a separate distribution server that puts the new files on the live server overnight.
Is there a开发者_StackOverflow中文版ny more standard/correct way of getting the latest release version of a project from a maven repository and copying it to some location?
Or, is there an easy way to query Artifactory via a shell script or something to retrieve URLs for the latest version of a project, plus it's dependencies?
Not sure about Artifactory but in Nexus (other maven repository manager) it's certainly possible. We used to have a shell script which would query Nexus repository (over http using wget and awk) and pull new releases of our project every night for automated deployment.
Once you have your project you could pull all dependencies for it using maven, e.g:
mvn dependency:resolve
精彩评论