Search in sources :

Example 41 with FeatureConfig

use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.

the class DisableConfigInheritanceIncludeDefaultConfigVariation1TestCase method createFeaturePacks.

@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
    servFp = newFpl("serv-prod", "1", "1.0");
    wfFp = newFpl("wf-prod", "1", "1.0");
    topFp = newFpl("top-prod", "1", "1.0");
    creator.newFeaturePack().setFPID(servFp.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "serv")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specA").setParam("p1", "serv")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build());
    creator.newFeaturePack().setFPID(wfFp.getFPID()).addDependency(FeaturePackConfig.builder(servFp).setInheritConfigs(false).includeDefaultConfig("model1", "name2").build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "wf")).build());
    creator.newFeaturePack().setFPID(topFp.getFPID()).addDependency(FeaturePackConfig.builder(wfFp).setInheritConfigs(true).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build());
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 42 with FeatureConfig

use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.

the class RedefinedDefaultConfigTestCase method createFeaturePacks.

@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
    baseFp = newFpl("base-prod", "1", "1.0");
    topFp = newFpl("top-prod", "1", "1.0");
    creator.newFeaturePack().setFPID(baseFp.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build());
    creator.newFeaturePack().setFPID(topFp.getFPID()).addDependency(FeaturePackConfig.builder(baseFp).setInheritConfigs(true).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build());
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 43 with FeatureConfig

use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.

the class RedefinedNonDefaultConfigTestCase method createFeaturePacks.

@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
    baseFp = newFpl("base-prod", "1", "1.0");
    topFp = newFpl("top-prod", "1", "1.0");
    creator.newFeaturePack().setFPID(baseFp.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build(), false).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "base")).build());
    creator.newFeaturePack().setFPID(topFp.getFPID()).addDependency(FeaturePackConfig.builder(baseFp).setInheritConfigs(true).build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build()).addConfig(ConfigModel.builder("model2", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "top")).build());
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Example 44 with FeatureConfig

use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.

the class BasicTransitiveDepCustomizationTestCase method createFeaturePacks.

@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
    fp1Fpl = newFpl("producer1", "1", "1.0.0.Final");
    fp2Fpl = newFpl("producer2", "1", "1.0.0.Final");
    fp3fpl = newFpl("producer3", "1", "1.0.0.Final");
    creator.newFeaturePack().setFPID(fp1Fpl.getFPID()).addDependency(fp2Fpl).addDependency(FeaturePackConfig.transitiveBuilder(new FeaturePackLocation(fp3fpl.getUniverse(), fp3fpl.getProducerName(), null, null, null)).excludePackage("p2").includePackage("p3").build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
    creator.newFeaturePack().setFPID(fp2Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3fpl).excludePackage("p4").build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
    creator.newFeaturePack().setFPID(fp3fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).newPackage("p1", true).addDependency("p2", true).addDependency("p4", true).writeContent("fp3/p1.txt", "fp3 100 p1").getFeaturePack().newPackage("p2").writeContent("fp3/p2.txt", "fp3 100 p2").getFeaturePack().newPackage("p3").writeContent("fp3/p3.txt", "fp3 100 p3").getFeaturePack().newPackage("p4").writeContent("fp3/p4.txt", "fp3 100 p4");
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation)

Example 45 with FeatureConfig

use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.

the class BasicTransitiveDepCustomizationWithVersionChangeTestCase method createFeaturePacks.

@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
    fp1Fpl = newFpl("producer1", "1", "1.0.0.Final");
    fp2Fpl = newFpl("producer2", "1", "1.0.0.Final");
    fp3_100_fpl = newFpl("producer3", "1", "1.0.0.Final");
    fp3_101_fpl = newFpl("producer3", "1", "1.0.1.Final");
    creator.newFeaturePack().setFPID(fp1Fpl.getFPID()).addDependency(fp2Fpl).addDependency(FeaturePackConfig.transitiveBuilder(fp3_101_fpl).excludePackage("p2").includePackage("p3").build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
    creator.newFeaturePack().setFPID(fp2Fpl.getFPID()).addDependency(FeaturePackConfig.builder(fp3_100_fpl).excludePackage("p4").build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
    creator.newFeaturePack().setFPID(fp3_100_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).newPackage("p1", true).addDependency("p2").addDependency("p4").writeContent("fp3/p1.txt", "fp3 100 p1").getFeaturePack().newPackage("p2").writeContent("fp3/p2.txt", "fp3 100 p2").getFeaturePack().newPackage("p3").writeContent("fp3/p3.txt", "fp3 100 p3").getFeaturePack().newPackage("p4").writeContent("fp3/p4.txt", "fp3 100 p4");
    creator.newFeaturePack().setFPID(fp3_101_fpl.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "2")).build()).newPackage("p1", true).addDependency("p2", true).addDependency("p4", true).writeContent("fp3/p1.txt", "fp3 101 p1").getFeaturePack().newPackage("p2").writeContent("fp3/p2.txt", "fp3 101 p2").getFeaturePack().newPackage("p3").writeContent("fp3/p3.txt", "fp3 101 p3").getFeaturePack().newPackage("p4").writeContent("fp3/p4.txt", "fp3 101 p4");
}
Also used : FeatureConfig(org.jboss.galleon.config.FeatureConfig)

Aggregations

FeatureConfig (org.jboss.galleon.config.FeatureConfig)76 StateDiffPlugin (org.jboss.galleon.plugin.StateDiffPlugin)8 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)6 FeaturePackCreator (org.jboss.galleon.creator.FeaturePackCreator)5 Test (org.junit.Test)4 Map (java.util.Map)3 FeatureId (org.jboss.galleon.spec.FeatureId)3 LinkedHashMap (java.util.LinkedHashMap)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)2 ProvisioningConfig (org.jboss.galleon.config.ProvisioningConfig)2 HashMap (java.util.HashMap)1 ProvisioningException (org.jboss.galleon.ProvisioningException)1 ConfigId (org.jboss.galleon.config.ConfigId)1 FeatureGroup (org.jboss.galleon.config.FeatureGroup)1 FeaturePackConfig (org.jboss.galleon.config.FeaturePackConfig)1 ResolvedSpecId (org.jboss.galleon.runtime.ResolvedSpecId)1 FeaturePackSpec (org.jboss.galleon.spec.FeaturePackSpec)1 SpecId (org.jboss.galleon.spec.SpecId)1 BasicStateDiffPlugin (org.jboss.galleon.userchanges.persist.test.BasicStateDiffPlugin)1