Eclipse rcp 对于Eclipse Oxygen 4.7.2,IArtifactRepositoryManager为空
在很长一段时间内,以下函数在Eclipse Neon 4.6.x目标运行时中运行良好:Eclipse rcp 对于Eclipse Oxygen 4.7.2,IArtifactRepositoryManager为空,eclipse-rcp,p2,Eclipse Rcp,P2,在很长一段时间内,以下函数在Eclipse Neon 4.6.x目标运行时中运行良好: public static boolean addRepository(IProvisioningAgent agent, String repo) { Utils.log(String.format("adding repository at %s", repo)); IMetadataRepositoryManager metadataManager = (IMetadataReposit
public static boolean addRepository(IProvisioningAgent agent, String repo) {
Utils.log(String.format("adding repository at %s", repo));
IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
if (metadataManager == null || artifactManager == null) {
Utils.log("P2Utils.addRepository - missing metadata or artifact manager");
return false;
}
try {
URI uri = new URI(repo);
metadataManager.addRepository(uri);
artifactManager.addRepository(uri);
return true;
} catch (Exception e) {
Utils.log(e);
return false;
}
}
它停止使用Eclipse Oxygen 4.7.2目标,返回的artifactManager始终为空。是否有人知道发生了什么变化以及如何修复?它破坏了我们的更新。我不知道该去哪里找。得到了回复,缺少一些插件:org.eclipse.equinox.p2.artifact.repository
org.eclipse.equinox.p2.transport.ecf