Reputation: 49237
What's the best way to download remote maven artifact from within a maven plugin while also supporting maven 2.2.x
1), 3.0.x
, 3.1.x
and newer?
Aether
seems a good candidate but it changed package namespace between 3.0.5
and 3.1
breaking compatibility.
There's pieces of information around,
Aether
underneath and presumably suffers from the same version incompatibility problemAther
based on the ResolveArtifact exampleSo what's the correct, or at least working, way to go on about this?
1) Where Maven 2.2.x
is a nice to have as pointed out by @khmarbaise is EoL
Upvotes: 8
Views: 388
Reputation: 22308
If you're in a plugin and want to have another plugin invoked, the best solution - by far - is to use Mojo Executor. This way, you won't rewrite the maven-dependency-plugin ... Considering the maven version issues, well, I guess you should indeed give up on maven 2.* support.
Upvotes: 1