use of io.cdap.cdap.test.remote.RemoteArtifactManager in project cdap by caskdata.
the class IntegrationTestManager method addPluginArtifact.
@Override
public ArtifactManager addPluginArtifact(ArtifactId artifactId, ArtifactId parent, @Nullable Set<PluginClass> additionalPlugins, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception {
Set<ArtifactRange> parents = new HashSet<>();
parents.add(new ArtifactRange(parent.getParent().getNamespace(), parent.getArtifact(), new ArtifactVersion(parent.getVersion()), true, new ArtifactVersion(parent.getVersion()), true));
addPluginArtifact(artifactId, parents, additionalPlugins, pluginClass, pluginClasses);
return new RemoteArtifactManager(clientConfig, restClient, artifactId);
}
use of io.cdap.cdap.test.remote.RemoteArtifactManager in project cdap by caskdata.
the class IntegrationTestManager method addPluginArtifact.
@Override
public ArtifactManager addPluginArtifact(ArtifactId artifactId, ArtifactId parent, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception {
Set<ArtifactRange> parents = new HashSet<>();
parents.add(new ArtifactRange(parent.getParent().getNamespace(), parent.getArtifact(), new ArtifactVersion(parent.getVersion()), true, new ArtifactVersion(parent.getVersion()), true));
addPluginArtifact(artifactId, parents, pluginClass, pluginClasses);
return new RemoteArtifactManager(clientConfig, restClient, artifactId);
}
use of io.cdap.cdap.test.remote.RemoteArtifactManager in project cdap by caskdata.
the class IntegrationTestManager method addPluginArtifact.
@Override
public ArtifactManager addPluginArtifact(ArtifactId artifactId, Set<ArtifactRange> parents, @Nullable Set<PluginClass> additionalPlugins, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception {
Manifest manifest = createManifest(pluginClass, pluginClasses);
final Location appJar = PluginJarHelper.createPluginJar(locationFactory, manifest, pluginClass, pluginClasses);
artifactClient.add(Ids.namespace(artifactId.getNamespace()), artifactId.getArtifact(), appJar::getInputStream, artifactId.getVersion(), parents, additionalPlugins);
appJar.delete();
return new RemoteArtifactManager(clientConfig, restClient, artifactId);
}
use of io.cdap.cdap.test.remote.RemoteArtifactManager in project cdap by cdapio.
the class IntegrationTestManager method addAppArtifact.
@Override
public ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass, Manifest manifest, File... bundleEmbeddedJars) throws Exception {
final Location appJar = AppJarHelper.createDeploymentJar(locationFactory, appClass, manifest, CLASS_ACCEPTOR, bundleEmbeddedJars);
artifactClient.add(artifactId, null, appJar::getInputStream);
appJar.delete();
return new RemoteArtifactManager(clientConfig, restClient, artifactId);
}
use of io.cdap.cdap.test.remote.RemoteArtifactManager in project cdap by cdapio.
the class IntegrationTestManager method addPluginArtifact.
@Override
public ArtifactManager addPluginArtifact(ArtifactId artifactId, ArtifactId parent, @Nullable Set<PluginClass> additionalPlugins, Class<?> pluginClass, Class<?>... pluginClasses) throws Exception {
Set<ArtifactRange> parents = new HashSet<>();
parents.add(new ArtifactRange(parent.getParent().getNamespace(), parent.getArtifact(), new ArtifactVersion(parent.getVersion()), true, new ArtifactVersion(parent.getVersion()), true));
addPluginArtifact(artifactId, parents, additionalPlugins, pluginClass, pluginClasses);
return new RemoteArtifactManager(clientConfig, restClient, artifactId);
}
Aggregations