use of org.jboss.galleon.universe.maven.MavenProducerInstaller in project galleon by wildfly.
the class MavenUniverseExtendAndInstallTestCase method doInit.
@Override
protected void doInit() throws Exception {
universe100Artifact = new MavenArtifact();
universe100Artifact.setGroupId(GROUP_ID);
universe100Artifact.setArtifactId("test-universe");
universe100Artifact.setVersion("1.0.0.Final");
universe101Artifact = new MavenArtifact();
universe101Artifact.setGroupId(universe100Artifact.getGroupId());
universe101Artifact.setArtifactId(universe100Artifact.getArtifactId());
universe101Artifact.setVersion("1.0.1.Final");
MavenArtifact artifact = new MavenArtifact();
artifact.setGroupId(GROUP_ID);
artifact.setArtifactId("producer1");
artifact.setVersion("1.0.0.Final");
MavenProducerInstaller producerInstaller = new MavenProducerInstaller("producer1", repo, artifact);
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
artifact = new MavenArtifact();
artifact.setGroupId(GROUP_ID);
artifact.setArtifactId("producer2");
artifact.setVersion("3.0.0.Final");
producerInstaller = new MavenProducerInstaller("producer2", repo, artifact);
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
artifact = new MavenArtifact();
artifact.setGroupId(GROUP_ID);
artifact.setArtifactId("producer3");
artifact.setVersion("2.5.1.Final");
producerInstaller = new MavenProducerInstaller("producer3", repo, artifact);
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
}
use of org.jboss.galleon.universe.maven.MavenProducerInstaller in project galleon by wildfly.
the class MavenUniverseLocationTestCase method doInit.
@Override
public void doInit() throws Exception {
MavenArtifact artifact = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId(PRODUCER1_ARTIFACT_ID).setVersion("1.0.0.Final");
MavenProducerInstaller producerInstaller = new MavenProducerInstaller("producer1", repo, artifact, FP_GROUP_ID, PRODUCER1_FP_ARTIFACT_ID);
producerInstaller.addChannel("5", "[5.0-alpha,6.0-alpha)");
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
artifact = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId(PRODUCER2_ARTIFACT_ID).setVersion("1.0.0.Final");
producerInstaller = new MavenProducerInstaller("producer2", repo, artifact, FP_GROUP_ID, PRODUCER1_FP_ARTIFACT_ID);
producerInstaller.addChannel("5", "[5.0-alpha,6.0-alpha)");
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
MavenArtifact universeArt = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("universe1-artifact").setVersion("1.0.0.Final");
MavenUniverseInstaller universeInstaller = new MavenUniverseInstaller(repo, universeArt);
universeInstaller.addProducer("producer1", GROUP_ID, PRODUCER1_ARTIFACT_ID, "[1.0.0,2.0.0)");
universeInstaller.install();
universeArt = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("universe1-artifact").setVersion("1.0.1.Final");
universeInstaller = new MavenUniverseInstaller(repo, universeArt);
universeInstaller.addProducer("producer1", GROUP_ID, PRODUCER1_ARTIFACT_ID, "[1.0.0,2.0.0)");
universeInstaller.addProducer("producer2", GROUP_ID, "producer2-artifact", "[1.0.0,2.0.0)");
universeInstaller.install();
resolver = UniverseResolver.builder().addArtifactResolver(repo).build();
fpArt = new MavenArtifact().setGroupId(FP_GROUP_ID).setArtifactId(PRODUCER1_FP_ARTIFACT_ID).setExtension("zip").setVersion("5.1.0.Alpha1");
FeaturePackCreator.getInstance().addArtifactResolver(repo).newFeaturePack(FeaturePackLocation.fromString("producer1@" + MavenUniverseFactory.ID + '(' + universeArt.getCoordsAsString() + "):5#5.1.0.Alpha1").getFPID()).getCreator().install();
}
use of org.jboss.galleon.universe.maven.MavenProducerInstaller in project galleon by wildfly.
the class MvnUniverse method createProducer.
public MvnUniverse createProducer(String producerName, String fpArtifactId, String defaultFrequency, String includeVersionRegex, String excludeVersionRegex) throws ProvisioningException {
final MavenProducerInstaller producer = new MavenProducerInstaller(producerName, repoManager, new MavenArtifact().setGroupId(TestConstants.GROUP_ID + '.' + name).setArtifactId(producerName).setVersion("1.0.0.Final"), TestConstants.GROUP_ID + '.' + name + '.' + producerName, fpArtifactId).addFrequencies(frequencies).addChannel("1", "[1.0.0-alpha,2.0.0-alpha)", false, includeVersionRegex, excludeVersionRegex);
if (defaultFrequency != null) {
producer.addFrequency(defaultFrequency, true);
}
producers = CollectionUtils.add(producers, producer.install());
return this;
}
use of org.jboss.galleon.universe.maven.MavenProducerInstaller in project galleon by wildfly.
the class MvnUniverse method createProducer.
public MvnUniverse createProducer(String producerName, String fpArtifactId, int defaultChannel, int channels) throws ProvisioningException {
MavenProducerInstaller producer = new MavenProducerInstaller(producerName, repoManager, new MavenArtifact().setGroupId(TestConstants.GROUP_ID + '.' + name).setArtifactId(producerName).setVersion("1.0.0.Final"), TestConstants.GROUP_ID + '.' + name + '.' + producerName, fpArtifactId);
producer.addFrequencies(frequencies);
while (channels > 0) {
producer.addChannel(Integer.toString(channels), new StringBuilder().append('[').append(channels).append(".0.0-alpha,").append(channels + 1).append(".0.0-alpha)").toString(), defaultChannel == channels);
--channels;
}
producers = CollectionUtils.add(producers, producer.install());
return this;
}
use of org.jboss.galleon.universe.maven.MavenProducerInstaller in project galleon by wildfly.
the class SimpleUniverseFactoryLoaderTestCase method doInit.
@Override
public void doInit() throws Exception {
MavenArtifact artifact = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId("producer-artifact1").setVersion("1.0.0.Final");
MavenProducerInstaller producerInstaller = new MavenProducerInstaller("producer1", repo, artifact, FP_GROUP_ID, FP_ARTIFACT_ID);
producerInstaller.addChannel("5", "[5.0,6.0)");
producerInstaller.addFrequencies("alpha", "beta");
producerInstaller.install();
artifact = new MavenArtifact().setGroupId(GROUP_ID).setArtifactId(UNIVERSE_ARTIFACT_ID).setVersion("1.0.0.Final");
final MavenUniverseInstaller universeInstaller = new MavenUniverseInstaller(repo, artifact);
universeInstaller.addProducer("producer1", GROUP_ID, "producer-artifact1", "[1.0.0,2.0.0)");
universeInstaller.install();
}
Aggregations