Hi,
In a plugin I want to dynamically check the dependencies and resolve
(download) correspondent artifacts with another classifier. Example: in
pom is declared dependency core-translation-0.2. The plugin should
download automatically core-translation-0.2-install.
My idea:
Loop through the dependencies and create for each a new Artifact with
ArtifactFactory.createDependencyArtifact(). Download the artifact with
ArtifactResolver.resolve(...)
Is this a correct approach?
Problems:
1. in the dependencies list injected with ${project.dependencies}
only partly transitive dependencies are listed, they are not completely
resolved. In the example the dependencies of core-translation-0.2 are
missing. However, I declared the mojo with @requiresDependencyResolution
compile
2. The ArtifactResolver.resolve() method needs the remote and local
repositories as parameter. The remote I can get from MavenProject but
from where do I get the local repository?
Kind regards
Wolfgang