1
1
/*
2
- * Copyright 2016-2019 Red Hat, Inc. and/or its affiliates
2
+ * Copyright 2016-2024 Red Hat, Inc. and/or its affiliates
3
3
* and other contributors as indicated by the @author tags.
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -72,6 +72,7 @@ private static boolean getBooleanProp(Map<String, String> props, String name, bo
72
72
private List <ResolvedFeature > orderedFeatures = Collections .emptyList ();
73
73
private List <ResolvedFeature > independentBatchBranch = Collections .emptyList ();
74
74
private List <ResolvedFeature > independentNonBatchBranch = Collections .emptyList ();
75
+ private final boolean ignoreCapabilities ;
75
76
76
77
DefaultBranchedConfigArranger (ConfigModelStack configStack ) {
77
78
this .configStack = configStack ;
@@ -83,6 +84,8 @@ private static boolean getBooleanProp(Map<String, String> props, String name, bo
83
84
branchIsBatch = getBooleanProp (configStack .props , ConfigModel .BRANCH_IS_BATCH , false );
84
85
isolateCircularDeps = getBooleanProp (configStack .props , ConfigModel .ISOLATE_CIRCULAR_DEPS , false );
85
86
mergeIndependentBranches = getBooleanProp (configStack .props , ConfigModel .MERGE_INDEPENDENT_BRANCHES , false );
87
+ // When analyzing incomplete configuration, capabilities can be missing and capability check be disabled.
88
+ ignoreCapabilities = Boolean .getBoolean ("org.jboss.galleon.internal.ignore.capability.providers" );
86
89
}
87
90
88
91
List <ResolvedFeature > orderFeatures () throws ProvisioningException {
@@ -626,7 +629,7 @@ private List<CircularRefInfo> orderCapabilityProviders(ResolvedFeature feature,
626
629
throws ProvisioningException {
627
630
for (CapabilitySpec capSpec : feature .spec .xmlSpec .getRequiredCapabilities ()) {
628
631
final List <String > resolvedCaps = capResolver .resolve (capSpec , feature );
629
- if (resolvedCaps .isEmpty ()) {
632
+ if (resolvedCaps .isEmpty () || ignoreCapabilities ) {
630
633
continue ;
631
634
}
632
635
for (String resolvedCap : resolvedCaps ) {
0 commit comments