use of org.jboss.galleon.universe.maven.MavenArtifact 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.MavenArtifact in project galleon by wildfly.
the class MvnUniverse method install.
public MavenArtifact install() throws ProvisioningException {
final MavenArtifact universeArtifact = new MavenArtifact().setGroupId(TestConstants.GROUP_ID).setArtifactId(name).setVersion("1.0.0.Final");
final MavenUniverseInstaller installer = new MavenUniverseInstaller(repoManager, universeArtifact);
for (MavenProducerBase p : producers) {
installer.addProducer(p.getName(), p.getArtifact().setPath(null).setVersionRange("[1.0,)"));
}
installer.install();
return universeArtifact;
}
use of org.jboss.galleon.universe.maven.MavenArtifact 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();
}
use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class BasicPluginLocationTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
final MavenArtifact pluginArtifact = new MavenArtifact().setGroupId("org.jboss.galleon.plugin.test").setArtifactId("test-plugin").setVersion("1");
installPluginArtifact(pluginArtifact, TestPlugin.class);
fp1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(fp1.getFPID()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1 p1").getFeaturePack().addPlugin("test-plugin", pluginArtifact.getCoordsAsString());
}
use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.
the class PatchedDependencyPluginDoesNotOverrideMainPluginTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
final MavenArtifact fp1Plugin = installPluginArtifact(new MavenArtifact().setGroupId("org.jboss.galleon.plugin.test").setArtifactId("fp1-plugin").setVersion("1"), Fp1Plugin1.class);
final MavenArtifact plugin1 = installPluginArtifact(new MavenArtifact().setGroupId("org.jboss.galleon.plugin.test").setArtifactId("test-plugin").setVersion("1"), TestPlugin1.class);
final MavenArtifact plugin2 = installPluginArtifact(new MavenArtifact().setGroupId("org.jboss.galleon.plugin.test").setArtifactId("test-plugin").setVersion("2"), TestPlugin2.class);
fp1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(fp1.getFPID()).addPlugin("test-plugin", plugin1.getCoordsAsString()).addPlugin("fp1-plugin", fp1Plugin.getCoordsAsString());
fp1Patch1 = newFpl("prod1", "1", "1.0.0.Patch1.Final");
creator.newFeaturePack(fp1Patch1.getFPID()).setPatchFor(fp1.getFPID()).addPlugin("test-plugin", plugin2.getCoordsAsString());
fp2 = newFpl("prod2", "1", "1.0.0.Final");
creator.newFeaturePack(fp2.getFPID()).addDependency(fp1).addPlugin("test-plugin", plugin1.getCoordsAsString());
}
Aggregations