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 artifactManager returned is always null. 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) {
Utils.log("P2Utils.addRepository - missing metadata or artifact manager");
return false;
}
try {
URI uri = new URI(repo);
mm.addRepository(uri);
am.addRepository(uri);
return true;
} catch (Exception e) {
Utils.log(e);
return false;
}
}