Search in sources :

Example 1 with RepositoryArtifactInstaller

use of org.jboss.galleon.repo.RepositoryArtifactInstaller 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);
}
Also used : ProvisioningException(org.jboss.galleon.ProvisioningException) RepositoryArtifactInstaller(org.jboss.galleon.repo.RepositoryArtifactInstaller) ChannelSpec(org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec)

Aggregations

ProvisioningException (org.jboss.galleon.ProvisioningException)1 RepositoryArtifactInstaller (org.jboss.galleon.repo.RepositoryArtifactInstaller)1 ChannelSpec (org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec)1