Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » No IArtifactRepositoryManager with Eclipse Oxygen 4.7.2 runtime
No IArtifactRepositoryManager with Eclipse Oxygen 4.7.2 runtime [message #1785898] Sun, 22 April 2018 17:27 Go to next message
Dmitry Perl is currently offline Dmitry PerlFriend
Messages: 13
Registered: September 2016
Junior Member
Hello everyone, may be somebody would have a clue on this one?
The following function worked perfectly in Eclipse Neon 4.6.x target runtime for a very long time in our RCP application. It stopped working with Eclipse Oxygen 4.7.2 target, - the IArtifactRepositoryManager returned is always null when trying to resolve it using agent.getService(..). Does anyone involved knows what was changed and how to fix this? It breaks our updates.., I am at a loss where to look...

	
public static boolean addRepository(IProvisioningAgent agent, String repo) {
  IMetadataRepositoryManager mm = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
  IArtifactRepositoryManager am = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
  if (mm == null || am == null) {
	return false;
  }
		
  try {
	URI uri = new URI(repo);
	mm.addRepository(uri);
	am.addRepository(uri);
	return true;
  } catch (Exception e) {
	return false;
  }
}
Re: No IArtifactRepositoryManager with Eclipse Oxygen 4.7.2 runtime [message #1786119 is a reply to message #1785898] Wed, 25 April 2018 18:57 Go to previous messageGo to next message
Eclipse UserFriend
It sounds like you may be missing the org.eclipse.equinox.p2.artifact.repository bundle?
Re: No IArtifactRepositoryManager with Eclipse Oxygen 4.7.2 runtime [message #1786195 is a reply to message #1786119] Thu, 26 April 2018 17:05 Go to previous messageGo to next message
Dmitry Perl is currently offline Dmitry PerlFriend
Messages: 13
Registered: September 2016
Junior Member
Quote:
It sounds like you may be missing the org.eclipse.equinox.p2.artifact.repository bundle?


That was it!
Thank you so much for the answer, saved us heaps of time..
I also had to add org.eclipse.equinox.p2.transport.ecf to make it finally work, not sure how it was working with the previous runtime but it's perfect now.
Re: No IArtifactRepositoryManager with Eclipse Oxygen 4.7.2 runtime [message #1786256 is a reply to message #1786195] Fri, 27 April 2018 20:25 Go to previous message
Eclipse UserFriend
It's helpful to use features rather than specifying bundles, as they are designed to bring in all the required functionality. For example, using the `org.eclipse.rcp` feature.
Previous Topic:how to create a page with a web-site link
Next Topic:I need to do a thing which eclipse does.
Goto Forum:
  


Current Time: Thu Apr 25 10:13:38 GMT 2024

Powered by FUDForum. Page generated in 0.03009 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top