use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class MavenUniverseLocationTestCase method testUniverseVersion.
@Test
public void testUniverseVersion() throws Exception {
final MavenArtifact universeArt = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("universe1-artifact").setVersion("1.0.0.Final");
Path path = resolver.resolve(FeaturePackLocation.fromString("producer1@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
try {
universeArt.setPath(null);
resolver.resolve(FeaturePackLocation.fromString("producer2@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.fail("producer2 is not in this universe version");
} catch (MavenUniverseException e) {
Assert.assertEquals(MavenErrors.producerNotFound("producer2").getLocalizedMessage(), e.getLocalizedMessage());
}
universeArt.setPath(null);
universeArt.setVersion("1.0.1.Final");
path = resolver.resolve(FeaturePackLocation.fromString("producer2@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
}
use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class MavenUniverseLocationTestCase method testUniverseWithoutVersion.
@Test
public void testUniverseWithoutVersion() throws Exception {
final MavenArtifact universeArt = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("universe1-artifact");
Path path = resolver.resolve(FeaturePackLocation.fromString("producer1@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
universeArt.setPath(null);
path = resolver.resolve(FeaturePackLocation.fromString("producer2@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
}
use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class MavenUniverseLocationTestCase method testUniverseVersionRange.
@Test
public void testUniverseVersionRange() throws Exception {
final MavenArtifact universeArt = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("universe1-artifact").setVersionRange("[1.0,2.0-alpha)");
Path path = resolver.resolve(FeaturePackLocation.fromString("producer1@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
universeArt.setPath(null);
path = resolver.resolve(FeaturePackLocation.fromString("producer2@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5/alpha"));
Assert.assertEquals(fpArt.getArtifactFileName(), path.getFileName().toString());
}
use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class MavenProducerExtendAndInstallTestCase method doInit.
@Override
protected void doInit() {
producer100Artifact = new MavenArtifact();
producer100Artifact.setGroupId(GROUP_ID);
producer100Artifact.setArtifactId("test-producer");
producer100Artifact.setVersion("1.0.0.Final");
producer101Artifact = new MavenArtifact();
producer101Artifact.setGroupId(producer100Artifact.getGroupId());
producer101Artifact.setArtifactId(producer100Artifact.getArtifactId());
producer101Artifact.setVersion("1.0.1.Final");
}
Aggregations