use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ResolveLatestVersionAndExcludeFeatureTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
universe1Art = newMvnUniverse("universe1").createProducer("producer1", "fp1").install();
final1Fpid = mvnFPID(FINAL1_FPL, universe1Art);
creator.newFeaturePack().setFPID(final1Fpid).addFeatureSpec(FeatureSpec.builder("specA").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").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();
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class ExcludeConfigIncludedFromTransitiveDepTestCase 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");
creator.newFeaturePack().setFPID(fp1.getFPID()).addDependency(FeaturePackConfig.builder(fp2).setInheritConfigs(false).includeDefaultConfig("model1", "name1").includeDefaultConfig("model1", "name2").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()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).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()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class IncludeConfigExcludedFromTransitiveDepMergedIntoAnotherConfigTestCase 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");
creator.newFeaturePack().setFPID(fp1.getFPID()).addDependency(FeaturePackConfig.builder(fp2).excludeDefaultConfig("model1", "name1").excludeDefaultConfig("model1", "name2").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()).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).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()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class IncludeConfigExcludedFromTransitiveDepTestCase 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");
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).newPackage("p1", true).writeContent("fp1/p1.txt", "fp1");
creator.newFeaturePack().setFPID(fp2.getFPID()).addDependency(fp3).addFeatureSpec(FeatureSpec.builder("specB").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specB").setParam("p1", "1")).build()).newPackage("p1", true).writeContent("fp2/p1.txt", "fp2");
creator.newFeaturePack().setFPID(fp3.getFPID()).addFeatureSpec(FeatureSpec.builder("specC").addParam(FeatureParameterSpec.createId("p1")).build()).addConfig(ConfigModel.builder("model1", "name1").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build()).addConfig(ConfigModel.builder("model1", "name2").addFeature(new FeatureConfig("specC").setParam("p1", "1")).build());
}
use of org.jboss.galleon.config.FeatureConfig in project galleon by wildfly.
the class LayerDependenciesWithDisabledInheritanceTestCase method createFeaturePacks.
@Override
protected void createFeaturePacks(FeaturePackCreator creator) throws ProvisioningException {
prod1 = newFpl("prod1", "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")).addParam(FeatureParameterSpec.create("p3", "spec")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("base").addFeature(new FeatureConfig("specA").setParam("id", "base")).addPackageDep("base").build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("a").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "a")).build()).addConfigLayer(ConfigLayerSpec.builder().setModel("model1").setName("b").addLayerDep("base").addFeature(new FeatureConfig("specA").setParam("id", "b")).build()).addConfig(ConfigModel.builder("model1", "main").includeLayer("a").includeLayer("b").build()).newPackage("base").writeContent("base.txt", "base");
}
Aggregations