jimmy
jimmy

Reputation: 8391

how to create Maven dependencies bat file?

I have a pom file where i have added all the dependencies. and .m2 folder where i have added Jar files added

But i am looking for a file where i can just add all the dependencies in the file like and run it.

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get
-DrepoUrl=http://download.java.net/maven/2/ -Dartifact=robo-guice:robo-guice:0.4-SNAPSHOT

So that i don't have to worry about jar files in my .m2 folder.

Is there any way to do that.

Thanks in advance.

Upvotes: 1

Views: 1571

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328780

You can use mvn dependency:copy-dependencies to copy all dependencies to some folder.

The other solution is to create a single JAR which contains everything. See the answers to this question: How can I create an executable JAR with dependencies using Maven?

Upvotes: 1

Related Questions