Search in sources :

Example 21 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testProducerUniverseFactoryFromString.

@Test
public void testProducerUniverseFactoryFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer@factory");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals(new UniverseSpec("factory"), parsedSrc.getUniverse());
    Assert.assertEquals("producer", parsedSrc.getProducerName());
    Assert.assertNull(parsedSrc.getChannelName());
    Assert.assertNull(parsedSrc.getFrequency());
    Assert.assertNull(parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 22 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testProducerWithoutUniverseToString.

@Test
public void testProducerWithoutUniverseToString() throws Exception {
    final ProducerSpec producer = new FeaturePackLocation(new UniverseSpec("factory", null), "producer", "channel", "frequency", "build").getProducer();
    Assert.assertEquals("producer@factory", producer.toString());
}
Also used : ProducerSpec(org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 23 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testProducerWithUniverseLocationToString.

@Test
public void testProducerWithUniverseLocationToString() throws Exception {
    final ProducerSpec producer = new FeaturePackLocation(new UniverseSpec("factory", "location"), "producer", "channel", "frequency", "build").getProducer();
    Assert.assertEquals("producer@factory(location)", producer.toString());
}
Also used : ProducerSpec(org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 24 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testMavenUniverseLocationFromString.

@Test
public void testMavenUniverseLocationFromString() throws Exception {
    final FeaturePackLocation parsedCoords = FeaturePackLocation.fromString("wildfly@maven(org.jboss.galleon-universe:jboss-galleon-universe:1.0.0.Final):14/beta#14.0.0.Beta1-SNAPSHOT");
    Assert.assertNotNull(parsedCoords);
    Assert.assertEquals("maven", parsedCoords.getUniverse().getFactory());
    Assert.assertEquals("org.jboss.galleon-universe:jboss-galleon-universe:1.0.0.Final", parsedCoords.getUniverse().getLocation());
    Assert.assertEquals("wildfly", parsedCoords.getProducerName());
    Assert.assertEquals("14", parsedCoords.getChannelName());
    Assert.assertEquals("beta", parsedCoords.getFrequency());
    Assert.assertEquals("14.0.0.Beta1-SNAPSHOT", parsedCoords.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 25 with FeaturePackLocation

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

the class FeaturePackLocationStringTestCase method testGactvFromString.

@Test
public void testGactvFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("groupId:artifactId:classifier:type:version");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals("maven", parsedSrc.getUniverse().getFactory());
    Assert.assertNull(parsedSrc.getUniverse().getLocation());
    Assert.assertEquals("groupId:artifactId:classifier: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