Search in sources :

Example 16 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testGacvFromString.

@Test
public void testGacvFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("groupId:artifactId:classifier:version");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals("maven", parsedSrc.getUniverse().getFactory());
    Assert.assertNull(parsedSrc.getUniverse().getLocation());
    Assert.assertEquals("groupId:artifactId:classifier:zip", parsedSrc.getProducerName());
    Assert.assertNull(parsedSrc.getChannelName());
    Assert.assertNull(parsedSrc.getFrequency());
    Assert.assertEquals("version", parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 17 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testLocationWithoutUniverseLocationFromString.

@Test
public void testLocationWithoutUniverseLocationFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer@factory:channel/frequency#build");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals("factory", parsedSrc.getUniverse().getFactory());
    Assert.assertNull(parsedSrc.getUniverse().getLocation());
    Assert.assertEquals("producer", parsedSrc.getProducerName());
    Assert.assertEquals("channel", parsedSrc.getChannelName());
    Assert.assertEquals("frequency", parsedSrc.getFrequency());
    Assert.assertEquals("build", parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 18 with FeaturePackLocation

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

Example 19 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testFeaturePackIdWithUniverseLocationFromString.

@Test
public void testFeaturePackIdWithUniverseLocationFromString() throws Exception {
    final FeaturePackLocation parsedCoords = FeaturePackLocation.fromString("producer@factory(location):channel#build");
    Assert.assertNotNull(parsedCoords);
    Assert.assertEquals("factory", parsedCoords.getUniverse().getFactory());
    Assert.assertEquals("location", parsedCoords.getUniverse().getLocation());
    Assert.assertEquals("producer", parsedCoords.getProducerName());
    Assert.assertEquals("channel", parsedCoords.getChannelName());
    Assert.assertNull(parsedCoords.getFrequency());
    Assert.assertEquals("build", parsedCoords.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 20 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testGatvFromString.

@Test
public void testGatvFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("groupId:artifactId::type:version");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals("maven", parsedSrc.getUniverse().getFactory());
    Assert.assertNull(parsedSrc.getUniverse().getLocation());
    Assert.assertEquals("groupId:artifactId::type", parsedSrc.getProducerName());
    Assert.assertNull(parsedSrc.getChannelName());
    Assert.assertNull(parsedSrc.getFrequency());
    Assert.assertEquals("version", parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Aggregations

FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)111 Test (org.junit.Test)46 Path (java.nio.file.Path)23 ProvisioningException (org.jboss.galleon.ProvisioningException)18 UniverseSpec (org.jboss.galleon.universe.UniverseSpec)18 FeaturePackConfig (org.jboss.galleon.config.FeaturePackConfig)16 ArrayList (java.util.ArrayList)13 FPID (org.jboss.galleon.universe.FeaturePackLocation.FPID)13 FeaturePackCreator (org.jboss.galleon.creator.FeaturePackCreator)12 ProducerSpec (org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec)9 XMLStreamException (javax.xml.stream.XMLStreamException)8 ProvisioningConfig (org.jboss.galleon.config.ProvisioningConfig)8 IOException (java.io.IOException)7 CommandExecutionException (org.jboss.galleon.cli.CommandExecutionException)7 HashMap (java.util.HashMap)6 CommandException (org.aesh.command.CommandException)6 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)6 FeatureConfig (org.jboss.galleon.config.FeatureConfig)6 FeaturePackLayout (org.jboss.galleon.layout.FeaturePackLayout)6 Set (java.util.Set)5