Search in sources :

Example 26 with MavenArtifact

use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.

the class FpDepPluginVersionOverrideTestCase 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());
    fp2 = newFpl("prod2", "1", "1.0.0.Final");
    creator.newFeaturePack(fp2.getFPID()).addDependency(fp1).addPlugin("test-plugin", plugin2.getCoordsAsString());
}
Also used : MavenArtifact(org.jboss.galleon.universe.maven.MavenArtifact)

Example 27 with MavenArtifact

use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.

the class FpListPluginVersionOverrideTestCase 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());
    fp2 = newFpl("prod2", "1", "1.0.0.Final");
    creator.newFeaturePack(fp2.getFPID()).addPlugin("test-plugin", plugin2.getCoordsAsString());
}
Also used : MavenArtifact(org.jboss.galleon.universe.maven.MavenArtifact)

Example 28 with MavenArtifact

use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.

the class SimplePluginPatchTestCase 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());
}
Also used : MavenArtifact(org.jboss.galleon.universe.maven.MavenArtifact)

Example 29 with MavenArtifact

use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.

the class MavenProducerInstallTestCase method doInit.

@Override
protected void doInit() {
    producerArtifact = new MavenArtifact();
    producerArtifact.setGroupId(GROUP_ID);
    producerArtifact.setArtifactId("test-producer");
    producerArtifact.setVersion("1.0.0.Final");
}
Also used : MavenArtifact(org.jboss.galleon.universe.maven.MavenArtifact)

Example 30 with MavenArtifact

use of org.jboss.galleon.universe.maven.MavenArtifact in project galleon by wildfly.

the class MavenUniverseInstallTestCase method doInit.

@Override
protected void doInit() throws Exception {
    universeArtifact = new MavenArtifact();
    universeArtifact.setGroupId(GROUP_ID);
    universeArtifact.setArtifactId("test-universe");
    universeArtifact.setVersion("1.0.0.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();
}
Also used : MavenProducerInstaller(org.jboss.galleon.universe.maven.MavenProducerInstaller) MavenArtifact(org.jboss.galleon.universe.maven.MavenArtifact)

Aggregations

MavenArtifact (org.jboss.galleon.universe.maven.MavenArtifact)34 MavenProducerInstaller (org.jboss.galleon.universe.maven.MavenProducerInstaller)11 MavenUniverseInstaller (org.jboss.galleon.universe.maven.MavenUniverseInstaller)8 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)6 MavenUniverseException (org.jboss.galleon.universe.maven.MavenUniverseException)6 Path (java.nio.file.Path)5 Test (org.junit.Test)5 MavenArtifactRepositoryManager (org.jboss.galleon.maven.plugin.util.MavenArtifactRepositoryManager)3 HashSet (java.util.HashSet)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 ProvisioningException (org.jboss.galleon.ProvisioningException)2 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1 Artifact (org.apache.maven.artifact.Artifact)1 Dependency (org.apache.maven.model.Dependency)1 Model (org.apache.maven.model.Model)1 Parent (org.apache.maven.model.Parent)1 PluginDescriptor (org.apache.maven.plugin.descriptor.PluginDescriptor)1