use of org.apache.sling.ide.artifacts.EmbeddedArtifact in project sling by apache.
the class ArtifactsLocatorImpl method loadToolingSupportBundle.
@Override
public EmbeddedArtifact loadToolingSupportBundle() {
BundleContext bundleContext = context.getBundleContext();
// TODO - remove version hardcoding
String version = "1.0.2";
String artifactId = "org.apache.sling.tooling.support.install";
String extension = "jar";
URL jarUrl = loadResource(bundleContext, ARTIFACTS_LOCATION + "/sling-tooling-support-install/" + artifactId + "." + extension);
return new EmbeddedArtifact(artifactId + "-" + version + "." + extension, version, jarUrl);
}
use of org.apache.sling.ide.artifacts.EmbeddedArtifact in project sling by apache.
the class ArtifactsLocatorImpl method loadSourceSupportBundle.
@Override
public EmbeddedArtifact loadSourceSupportBundle() {
BundleContext bundleContext = context.getBundleContext();
// TODO - remove version hardcoding
String version = "1.0.2";
String artifactId = "org.apache.sling.tooling.support.source";
String extension = "jar";
URL jarUrl = loadResource(bundleContext, ARTIFACTS_LOCATION + "/sling-tooling-support-source/" + artifactId + "." + extension);
return new EmbeddedArtifact(artifactId + "-" + version + "." + extension, version, jarUrl);
}
use of org.apache.sling.ide.artifacts.EmbeddedArtifact in project sling by apache.
the class ToolingSupportBundle method before.
@Override
protected void before() throws Throwable {
EmbeddedArtifactLocator locator = Activator.getDefault().getArtifactLocator();
EmbeddedArtifact toolingBundle = locator.loadToolingSupportBundle();
OsgiClientFactory clientFactory = Activator.getDefault().getOsgiClientFactory();
OsgiClient osgiClient = clientFactory.createOsgiClient(new RepositoryInfo(config.getUsername(), config.getPassword(), config.getUrl()));
osgiClient.installBundle(toolingBundle.openInputStream(), toolingBundle.getName());
}
Aggregations