I am writing a script for deploying java application. The scenarion is simple:
- Download pusblished application (jar) from repository to local folder.
- Run java with jar
How can I download this jar from maven repo to local folder?
Important
- The question is not about resolving one artifact. Here is a solution to donwload single artifact to local repository, but I want to specified folder.
- Also the solution should work from command line without pom file. E.g. run
mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:copy
will fail, because it runs only in folder wherepom.xml
is present.