Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download a jar with all the dependencies directly from a maven repository?

Tags:

java

maven

What I want to do is downloading one jar (foo.jar) and all dependencies of it into lib/ directory

mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \
  -DremoteRepositories=http://nexus.example.com/content/groups/public/ \
  -Dartifact=com.example:foo:1.0-SNAPSHOT \
  -Ddest=/path/to/foo.jar

I also used -Dtransitive=true to download the transitive dependencies but it seems not working. I used copy-dependencies instead of get but it requires the current directory containing pom.xml namely a maven project here.

like image 978
bitdancer Avatar asked Dec 27 '25 18:12

bitdancer


1 Answers

You can download everything online from this site https://jar-download.com/online-maven-download-tool.php. This works for me.

like image 118
Steven Avatar answered Dec 30 '25 06:12

Steven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!