What I need to do is to download an artifact from my internal repository (currently Nexus) with all its dependencies, to a specified directory. And that without actually downloading the source code (and using its pom.xml
): I need to just run a plain maven command from the shell and access the binaries in my repository.
I don't need to download the dependencies to my local repository (the behaviour of the dependency:get / dependency:copy plugins), I want the artifact AND all of its dependencies copied to a specified directory.
Something like this:
mvn super-downloader:download-everything -Dartifact=my.group:myArtifact:version -Ddirectory=.
What I've tried:
dependency:get and dependency:copy plugins copy the dependencies to my local repository (under ~/.m2) which is not what I want.
dependency:copy-dependencies requires a maven project. I need to run the command without a pom.xml.
com.googlecode.maven-download-plugin:maven-download-plugin:artifact plugin should work with -DdependencyDepth=<some high value>
, but it fails trying to resolve a dependency to xerces:xerces-impl:2.6.2
. I manually uploaded it to my Nexus, but then it failed trying to find xml-apis:xml-apis:2.6.2
, which doesn't exist.
So, any ideas?
Thanks.