use of org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec in project galleon by wildfly.
the class FeaturePackLocationStringTestCase method testChannelWithoutUniverseLocationToString.
@Test
public void testChannelWithoutUniverseLocationToString() throws Exception {
final ChannelSpec channel = new FeaturePackLocation(new UniverseSpec("factory", null), "producer", "channel", "frequency", "build").getChannel();
Assert.assertEquals("producer@factory:channel", channel.toString());
}
use of org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec in project galleon by wildfly.
the class FeaturePackLocationStringTestCase method testChannelWithoutFrequencyToString.
@Test
public void testChannelWithoutFrequencyToString() throws Exception {
final ChannelSpec channel = new FeaturePackLocation(new UniverseSpec("factory", "location"), "producer", "channel", null, "build").getChannel();
Assert.assertEquals("producer@factory(location):channel", channel.toString());
}
use of org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec in project galleon by wildfly.
the class LegacyGalleon1FeaturePackInstaller method install.
@Override
public void install(Universe<?> universe, FeaturePackLocation.FPID fpid, Path fpZip) throws ProvisioningException {
final LegacyGalleon1Universe mvnUni = (LegacyGalleon1Universe) universe;
final ChannelSpec channel = fpid.getChannel();
final LegacyGalleon1Producer producer = mvnUni.getProducer(channel.getProducer());
// make sure the channel exists
producer.getChannel(channel.getName());
if (!(mvnUni.artifactResolver instanceof RepositoryArtifactInstaller)) {
throw new ProvisioningException(mvnUni.artifactResolver.getClass().getName() + " is not an instance of " + LegacyGalleon1RepositoryManager.class.getName());
}
((RepositoryArtifactInstaller) mvnUni.artifactResolver).install(LegacyGalleon1Universe.toMavenCoords(fpid.getLocation()), fpZip);
}
Aggregations