Note: maven-dependency-plugin isn't suitable here for reasons specified below
I'm deploying projects to Artifactory with sources attached. I'd like to be able to run a command to download and unpack sources for a given artifact and its dependencies. I'll be using this to diff two versions of an artifact.
What I'd like to do is basically this:
mvn extract:sources -DgroupId=[groupId] -DartifactId=[artifactId] -Dversion=[version]
Have tried combining a couple of goals from the maven-dependency-plugin but this doesn't seem capable of doing what I need:
- :unpack-dependencies requires a project
- :get requires me to explicitly specify a remote repo. Why can't it use those in my settings.xml?
I've tried writing my own mojo to do this but am flummoxed because I can't seem to get a handle on remote repositories unless I'm in a project directory. Thus I can't download the project. And even once I have downloaded the project, the mojo will have already initialised its ${project} hence I won't be able to get its dependencies etc
Would appreciate your help.