Search in sources :

Example 6 with FeaturePackCreator

use of org.jboss.galleon.creator.FeaturePackCreator in project galleon by wildfly.

the class StateTestCase method installNoFeatures.

public static void installNoFeatures(String version) throws ProvisioningException {
    FeaturePackCreator creator = FeaturePackCreator.getInstance().addArtifactResolver(cli.getSession().getMavenRepoManager());
    FeaturePackLocation fp1 = new FeaturePackLocation(universeSpec, PRODUCER5, "1", null, version);
    creator.newFeaturePack(fp1.getFPID()).addConfigLayer(ConfigLayerSpec.builder().setModel("testmodel").setName("base-" + PRODUCER5).addPackageDep("p1").build()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1 p1").getFeaturePack().addConfig(ConfigModel.builder().setModel("testmodel").setName("name1").includeLayer("base-" + PRODUCER5).build());
    creator.install();
}
Also used : FeaturePackCreator(org.jboss.galleon.creator.FeaturePackCreator) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Example 7 with FeaturePackCreator

use of org.jboss.galleon.creator.FeaturePackCreator in project galleon by wildfly.

the class StateTestCase method install.

public static void install(String version) throws ProvisioningException {
    FeaturePackCreator creator = FeaturePackCreator.getInstance().addArtifactResolver(cli.getSession().getMavenRepoManager());
    FeaturePackLocation fp1 = new FeaturePackLocation(universeSpec, PRODUCER1, "1", null, version);
    creator.newFeaturePack(fp1.getFPID()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1 p1").getFeaturePack().addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder().setModel("model1").setName("name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build());
    creator.install();
}
Also used : FeaturePackCreator(org.jboss.galleon.creator.FeaturePackCreator) FeatureConfig(org.jboss.galleon.config.FeatureConfig) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Example 8 with FeaturePackCreator

use of org.jboss.galleon.creator.FeaturePackCreator in project galleon by wildfly.

the class CliTestUtils method installPatch.

public static FPID installPatch(CliWrapper cli, UniverseSpec universeSpec, String producer, String version, String qualifier, Path directory) throws ProvisioningException {
    FeaturePackCreator creator = FeaturePackCreator.getInstance().addArtifactResolver(cli.getSession().getMavenRepoManager());
    FeaturePackLocation fp1 = new FeaturePackLocation(universeSpec, producer, "1", null, version + "-patch-" + qualifier);
    creator.newFeaturePack(fp1.getFPID()).setPatchFor(buildFPL(universeSpec, producer, "1", null, version + "." + qualifier).getFPID()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1 p1 patch");
    creator.install(directory);
    return fp1.getFPID();
}
Also used : FeaturePackCreator(org.jboss.galleon.creator.FeaturePackCreator) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Example 9 with FeaturePackCreator

use of org.jboss.galleon.creator.FeaturePackCreator in project galleon by wildfly.

the class CliTestUtils method install.

public static void install(CliWrapper cli, UniverseSpec universeSpec, String producer, String version) throws ProvisioningException {
    FeaturePackCreator creator = FeaturePackCreator.getInstance().addArtifactResolver(cli.getSession().getMavenRepoManager());
    FeaturePackLocation fp1 = new FeaturePackLocation(universeSpec, producer, "1", null, version);
    creator.newFeaturePack(fp1.getFPID()).newPackage("p1", true).writeContent(producer + "/p1.txt", "fp1 p1");
    creator.install();
}
Also used : FeaturePackCreator(org.jboss.galleon.creator.FeaturePackCreator) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Example 10 with FeaturePackCreator

use of org.jboss.galleon.creator.FeaturePackCreator in project galleon by wildfly.

the class CliTestUtils method install.

public static void install(CliWrapper cli, UniverseSpec universeSpec, String producer, String version, Class<? extends InstallPlugin> plugin) throws ProvisioningException {
    FeaturePackCreator creator = FeaturePackCreator.getInstance().addArtifactResolver(cli.getSession().getMavenRepoManager());
    FeaturePackLocation fp1 = new FeaturePackLocation(universeSpec, producer, "1", null, version);
    creator.newFeaturePack(fp1.getFPID()).addPlugin(plugin).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1 p1");
    creator.install();
}
Also used : FeaturePackCreator(org.jboss.galleon.creator.FeaturePackCreator) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Aggregations

FeaturePackCreator (org.jboss.galleon.creator.FeaturePackCreator)14 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)12 FeatureConfig (org.jboss.galleon.config.FeatureConfig)5 ProvisioningManager (org.jboss.galleon.ProvisioningManager)1 FeaturePackConfig (org.jboss.galleon.config.FeaturePackConfig)1 StateDiffPlugin (org.jboss.galleon.plugin.StateDiffPlugin)1 BasicStateDiffPlugin (org.jboss.galleon.userchanges.persist.test.BasicStateDiffPlugin)1