简体   繁体   中英

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.

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM