Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] Cannot get RepositorySystem instance from DefaultServiceLocator within Eclipse RCP

Dear List,
 
I'm trying to access a Maven repo from within an Eclipse RCP app. I'm doing this via the following code:
 
DefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
locator.addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
... and other addService()s
RepositorySystem mvnSystem = locator.getService(RepositorySystem.class);
 
However, mvnSystem remains null.
 
I've included all Features returned from a search "aether" on the Mars update site, and added all "aether" packages to my plugin.
 
I've also seen the same code used in other instances (checked some repos on the web).
 
Does anyone have any idea why this code wouldn't work?
 
Many thanks!
Stefan

Back to the top