void createPluginInjector( final PluginRepositoryArtifact plugin, final PluginDescriptor descriptor) throws NoSuchPluginRepositoryArtifactException { final String location = "reference:" + plugin.getFile().getParentFile().toURI(); try { systemBundleProvider.get().getBundleContext().installBundle(location).start(); } catch (BundleException e) { throw new IllegalStateException("Problem installing: " + location, e); } }
private File getP2BridgePluginDir() { try { final GAVCoordinate pluginGav = getP2BridgePluginGAV(); final PluginRepositoryArtifact pluginArtifact = pluginRepositoryManager.resolveArtifact(pluginGav); return pluginArtifact.getFile().getParentFile(); } catch (final NoSuchPluginRepositoryArtifactException e) { throw new IllegalStateException("Could not locate nexus-p2-bridge-plugin", e); } }