Search in sources :

Example 6 with Channel

use of org.jboss.galleon.universe.Channel in project galleon by wildfly.

the class ProvisioningLayout method normalize.

private FeaturePackLocation normalize(FeaturePackLocation fpl) throws ProvisioningException {
    if (fpl.isMavenCoordinates()) {
        return fpl;
    }
    if (fpl.getChannelName() != null) {
        if (fpl.getBuild() != null) {
            return fpl;
        }
        return resolveLatestBuild(fpl, layoutFactory.getUniverseResolver().getChannel(fpl));
    }
    final Channel channel = layoutFactory.getUniverseResolver().getChannel(fpl);
    if (fpl.getBuild() != null) {
        final FeaturePackLocation updatedFpl = new FeaturePackLocation(fpl.getUniverse(), fpl.getProducerName(), channel.getName(), fpl.getFrequency(), fpl.getBuild());
        registerResolvedVersion(fpl.getProducer(), updatedFpl);
        return updatedFpl;
    }
    return resolveLatestBuild(fpl, channel);
}
Also used : Channel(org.jboss.galleon.universe.Channel) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Aggregations

Channel (org.jboss.galleon.universe.Channel)6 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)5 ProvisioningException (org.jboss.galleon.ProvisioningException)3 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 IOException (java.io.IOException)1 Collection (java.util.Collection)1 LinkedHashSet (java.util.LinkedHashSet)1 Set (java.util.Set)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 PmSession (org.jboss.galleon.cli.PmSession)1 UniverseManager (org.jboss.galleon.cli.UniverseManager)1 FPID (org.jboss.galleon.universe.FeaturePackLocation.FPID)1 Producer (org.jboss.galleon.universe.Producer)1 UniverseSpec (org.jboss.galleon.universe.UniverseSpec)1 MavenProducer (org.jboss.galleon.universe.maven.MavenProducer)1