use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class PersistFeatureIncludeExcludeAddWithInheritFeaturesTrueSpecExcludedTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
creator.newFeaturePack(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("a", "spec")).addParam(FeatureParameterSpec.create("b", "spec")).addParam(FeatureParameterSpec.create("c", "spec")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("a", "config").setParam("b", "config")).addFeature(new FeatureConfig("specA").setParam("id", "2").setParam("a", "config").setParam("b", "config")).build()).addService(StateDiffPlugin.class, BasicStateDiffPlugin.class).addPlugin(TestConfigsPersistingPlugin.class);
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ConfigLayersSameFeaturePackTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
universe1Art = newMvnUniverse("universe1").createProducer("producer1", "fp1").install();
prod1 = mvnFPID(FINAL1_FPL, universe1Art);
creator.newFeaturePack().setFPID(prod1).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).addParam(FeatureParameterSpec.create("p2", "spec")).addParam(FeatureParameterSpec.create("p3", true)).addParam(FeatureParameterSpec.create("p4", true)).addParam(FeatureParameterSpec.create("p5", true)).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("p1", "base").setParam("p2", "base").setParam("p5", "base")).addFeature(new FeatureConfig("specA").setParam("p1", "base1").setParam("p2", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("ejb").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("p1", "ejb")).addFeature(new FeatureConfig("specA").setParam("p1", "base1").setParam("p2", "ejb").setParam("p3", "ejb").setParam("p4", "ejb")).addPackageDep("ejb").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("undertow").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("p1", "undertow")).addFeature(new FeatureConfig("specA").setParam("p1", "base1").setParam("p4", "undertow")).addPackageDep("undertow").build()).addConfig(ConfigModel.builder("model1", "name1").includeLayer("ejb").includeLayer("undertow").addFeature(new FeatureConfig("specA").setParam("p1", "1")).addFeature(new FeatureConfig("specA").setParam("p1", "2")).build()).newPackage("p1", true).writeContent("fp1/p1.txt", "p1 final 1.0.1").getFeaturePack().newPackage("base").addDependency("other", true).addDependency("another", true).writeContent("base.txt", "base").getFeaturePack().newPackage("ejb").writeContent("ejb.txt", "ejb").getFeaturePack().newPackage("undertow").writeContent("undertow.txt", "undertow").getFeaturePack().newPackage("other").writeContent("other.txt", "other").getFeaturePack().newPackage("another").writeContent("another.txt", "another");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ExcludeFeatureFromDependantConfigLayerTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
prod2 = newFpl("prod2", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p1", "prod1")).addFeature(new FeatureConfig("specA").setParam("id", "2").setParam("p1", "prod1")).addPackageDep("prod1").build()).newPackage("prod1").writeContent("prod1.txt", "prod1");
creator.newFeaturePack().setFPID(prod2.getFPID()).addDependency(prod1).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base2").addLayerDep("base").excludeFeature(FeatureId.create("specA", "id", "1")).addFeature(new FeatureConfig("specB").setParam("id", "1").setParam("p2", "prod2")).addPackageDep("prod2").build()).newPackage("prod2").writeContent("prod2.txt", "prod2");
creator.install();
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ExcludeFeatureFromInheritedConfigLayerTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "1", "1.0.0.Final");
prod2 = newFpl("prod2", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(prod1.getFPID()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "1").setParam("p1", "prod1")).addFeature(new FeatureConfig("specA").setParam("id", "2").setParam("p1", "prod1")).addPackageDep("prod1").build()).newPackage("prod1").writeContent("prod1.txt", "prod1");
creator.newFeaturePack().setFPID(prod2.getFPID()).addDependency(prod1).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("id")).addParam(FeatureParameterSpec.create("p1", "spec")).addParam(FeatureParameterSpec.create("p2", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").excludeFeature(FeatureId.create("specA", "id", "1")).addFeature(new FeatureConfig("specB").setParam("id", "1").setParam("p2", "prod2")).addPackageDep("prod2").build()).newPackage("prod2").writeContent("prod2.txt", "prod2");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ReenableConfigInheritanceInTransitiveDepTreeTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
fp1 = newFpl("prod1", "1", "1.0.0.Final");
fp2 = newFpl("prod2", "1", "1.0.0.Final");
fp3 = newFpl("prod3", "1", "1.0.0.Final");
fp4 = newFpl("prod4", "1", "1.0.0.Final");
creator.newFeaturePack().setFPID(fp1.getFPID()).addDependency(FeaturePackConfig.builder(fp2).setInheritConfigs(false).setInheritPackages(false).build()).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specA").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specA").setParam("p1", "2")).build(), false).addConfig(ConfigModel.builder("model1", "name5").addFeature(new FeatureConfig("specA").setParam("p1", "5")).build(), false).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addDependency(FeaturePackConfig.builder(fp3).setInheritConfigs(false).includeDefaultConfig("model1", "name5").build()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build(), false).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specB").setParam("p1", "2")).build()).addConfig(ConfigModel.builder("model1", "name3").addFeature(new FeatureConfig("specB").setParam("p1", "3")).build()).addConfig(ConfigModel.builder("model1", "name4").addFeature(new FeatureConfig("specB").setParam("p1", "4")).build(), false).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
creator.newFeaturePack().setFPID(fp3.getFPID()).addDependency(fp4).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build(), false).addConfig(ConfigModel.builder("model1", "name5").addFeature(new FeatureConfig("specC").setParam("p1", "5")).build());
creator.newFeaturePack().setFPID(fp4.getFPID()).addFeatureSpec(FeatureSpec.builder("specD").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specD").setParam("p1", "1")).build(), false).addConfig(ConfigModel.builder("model1", "name5").addFeature(new FeatureConfig("specD").setParam("p1", "5")).build());
}
Aggregations