bitdancer
bitdancer

Reputation: 1365

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

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.

Upvotes: 4

Views: 11330

Answers (1)

Steven
Steven

Reputation: 37

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

Upvotes: 1

Related Questions