I am developing a new Maven plugin using the API v3.1.1 because I need to upgrade to Maven 3.1.1, and you need an Aether way to work with artifact repositories, among other things, getting a complete list of artifact versions. I am using Eclipse Aether (0.9.0.M4), NOT a sonatype ether.
I already read http://wiki.eclipse.org/Aether and tried the demo http://git.eclipse.org/c/aether/aether-demo.git/tree/ , but I could not understand why the next subclass is insideAbstractMojo does not work.
Both RepositorySystem repoSystem, RepositorySystemSession repoSession, List<RemoteRepository> projectReposand List<RemoteRepository> pluginReposare equal null.
I also tried using @Componentto introduce the same result.
Is there something I missed to get these objects introduced into mojo?
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.RemoteRepository;
...
public MyMojo extends AbstractMojo
{
private RepositorySystem repoSystem;
private RepositorySystemSession repoSession;
private List<RemoteRepository> projectRepos;
private List<RemoteRepository> pluginRepos;
...
}
source
share