Skip to content

Commit

Permalink
Merge pull request #90 from jfdenise/main
Browse files Browse the repository at this point in the history
Disable capability check when analyzing features, upgrade dependencies
  • Loading branch information
jfdenise authored Nov 12, 2024
2 parents 85d27bc + ba50c2f commit 173f973
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: mvn clean install -Dversion.org.wildfly.glow=${{ env.WILDFLY_GLOW_VERSION }}
shell: bash
working-directory: wildfly-maven-plugin
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
Expand Down
64 changes: 36 additions & 28 deletions core/src/main/java/org/wildfly/glow/GlowSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class GlowSession {
public static final Path OFFLINE_FEATURE_PACKS_DIR = OFFLINE_CONTENT.resolve("feature-packs");
public static final Path OFFLINE_FEATURE_PACK_DEPENDENCIES_DIR = OFFLINE_CONTENT.resolve("feature-pack-dependencies");
public static final String STANDALONE_PROFILE = "standalone";

private static final String GALLEON_DISABLE_CAPABILITIES_CHECK_PROPERTY = "org.jboss.galleon.internal.ignore.capability.providers";
private final MavenRepoManager resolver;
private final Arguments arguments;
private final GlowMessageWriter writer;
Expand Down Expand Up @@ -544,44 +544,52 @@ public ScanResults scan() throws Exception {
checkLayers.add(baseLayer);
checkLayers.addAll(decorators);
// Retrieve the features of each layer
for (Layer layer : checkLayers) {
try {
GalleonConfigurationWithLayers configLayers = GalleonConfigurationWithLayersBuilder.builder("standalone", "standalone.xml").includeLayer(layer.getName()).build();
GalleonProvisioningConfig.Builder config2Builder = GalleonProvisioningConfig.builder().addConfig(configLayers).addOption(Constants.CONFIG_STABILITY_LEVEL, Constants.STABILITY_EXPERIMENTAL);
for (GalleonFeaturePackConfig fp : activeConfig.getFeaturePackDeps()) {
config2Builder.addFeaturePackDep(GalleonFeaturePackConfig.
builder(fp.getLocation(), false).setInheritConfigs(false).build());
}
GalleonProvisioningConfig config2 = config2Builder.build();
try {
System.setProperty(GALLEON_DISABLE_CAPABILITIES_CHECK_PROPERTY, "true");
for (Layer layer : checkLayers) {
try {
GalleonConfigurationWithLayers configLayers = GalleonConfigurationWithLayersBuilder.builder("standalone", "standalone.xml").includeLayer(layer.getName()).build();
GalleonProvisioningConfig.Builder config2Builder = GalleonProvisioningConfig.builder().addConfig(configLayers).addOption(Constants.CONFIG_STABILITY_LEVEL, Constants.STABILITY_EXPERIMENTAL);
for (GalleonFeaturePackConfig fp : activeConfig.getFeaturePackDeps()) {
config2Builder.addFeaturePackDep(GalleonFeaturePackConfig.
builder(fp.getLocation(), false).setInheritConfigs(false).build());
}
GalleonProvisioningConfig config2 = config2Builder.build();

try (GalleonProvisioningRuntime rt = provisioning.getProvisioningRuntime(config2)) {
List<GalleonFeatureSpec> lst = rt.getAllFeatures();
for (GalleonFeatureSpec spec : lst) {
String stab = spec.getStability();
if (stab != null && !StabilitySupport.enables(configStability, stab)) {
Set<String> set = excludedFeatures.get(layer);
if (set == null) {
set = new HashSet<>();
excludedFeatures.put(layer, set);
}
set.add(spec.getName() + "[stability=" + spec.getStability() + "]");
}
for (GalleonFeatureParamSpec pspec : spec.getParams()) {
String pstab = pspec.getStability();
if (pstab != null && !StabilitySupport.enables(configStability, pstab)) {
try (GalleonProvisioningRuntime rt = provisioning.getProvisioningRuntime(config2)) {
List<GalleonFeatureSpec> lst = rt.getAllFeatures();
for (GalleonFeatureSpec spec : lst) {
String stab = spec.getStability();
if (stab != null && !StabilitySupport.enables(configStability, stab)) {
Set<String> set = excludedFeatures.get(layer);
if (set == null) {
set = new HashSet<>();
excludedFeatures.put(layer, set);
}
set.add(spec.getName() + "." + pspec.getName() + "[stability=" + pspec.getStability() + "]");
set.add(spec.getName() + "[stability=" + spec.getStability() + "]");
}
for (GalleonFeatureParamSpec pspec : spec.getParams()) {
String pstab = pspec.getStability();
if (pstab != null && !StabilitySupport.enables(configStability, pstab)) {
Set<String> set = excludedFeatures.get(layer);
if (set == null) {
set = new HashSet<>();
excludedFeatures.put(layer, set);
}
set.add(spec.getName() + "." + pspec.getName() + "[stability=" + pspec.getStability() + "]");
}
}
}
}
} catch (Exception ex) {
if (arguments.isVerbose()) {
ex.printStackTrace();
}
writer.warn("Got unexpected exception dealing with " + layer + " features. Exception" + ex + ". Please report the issue. Enable verbose to display the stack trace.");
}
} catch (Exception ex) {
writer.warn("Got unexpected exception dealing with " + layer + " features. Exception" + ex +". Please report the issue.");
}
} finally {
System.clearProperty(GALLEON_DISABLE_CAPABILITIES_CHECK_PROPERTY);
}
}
if(arguments.getPackageStability() != null) {
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
<version.info.picocli>4.7.5</version.info.picocli>
<version.org.ow2.asm>9.5</version.org.ow2.asm>
<version.biz.aQute.bnd>6.4.0</version.biz.aQute.bnd>
<version.org.wildfly.plugins.wildfly-plugin-tools>1.0.0.Final</version.org.wildfly.plugins.wildfly-plugin-tools>
<version.org.wildfly.plugins.wildfly-plugin-tools>1.1.0.Final</version.org.wildfly.plugins.wildfly-plugin-tools>
<version.org.wildfly.common.wildfly-common>1.7.0.Final</version.org.wildfly.common.wildfly-common>
<version.com.puppycrawl.tools.checkstyle>8.18</version.com.puppycrawl.tools.checkstyle>
<version.com.fasterxml.jackson.core>2.17.0</version.com.fasterxml.jackson.core>
<version.com.fasterxml.jackson.core>2.17.2</version.com.fasterxml.jackson.core>
<version.io.smallrye.jandex>3.1.6</version.io.smallrye.jandex>
<version.org.apache.maven>3.8.6</version.org.apache.maven>
<version.org.apache.maven.checkstyle>3.0.0</version.org.apache.maven.checkstyle>
<version.org.apache.maven.resolver>1.6.3</version.org.apache.maven.resolver>
<version.org.jboss.galleon>6.0.0.Final</version.org.jboss.galleon>
<version.org.wildfly.channel>1.1.0.Final</version.org.wildfly.channel>
<version.org.jboss.galleon>6.0.4.Final</version.org.jboss.galleon>
<version.org.wildfly.channel>1.2.1.Final</version.org.wildfly.channel>
<version.org.jboss.logging.slf4j-jboss-logging>1.2.1.Final</version.org.jboss.logging.slf4j-jboss-logging>
<version.org.yaml.snakeyaml>2.0</version.org.yaml.snakeyaml>
<version.org.yaml.snakeyaml>2.2</version.org.yaml.snakeyaml>
<version.org.apache.commons>3.12.0</version.org.apache.commons>
<version.org.apache.maven.maven-core>3.6.2</version.org.apache.maven.maven-core>
<version.org.apache.maven.core>3.8.4</version.org.apache.maven.core>
Expand All @@ -42,7 +42,7 @@
<version.org.apache.surefire.plugin>2.22.2</version.org.apache.surefire.plugin>
<version.io.fabric8>6.10.0</version.io.fabric8>
<!-- arquillian plugin -->
<version.org.jboss.arquillian.core>1.7.0.Alpha13</version.org.jboss.arquillian.core>
<version.org.jboss.arquillian.core>1.9.1.Final</version.org.jboss.arquillian.core>
<version.org.jboss.shrinkwrap.descriptors>2.0.0</version.org.jboss.shrinkwrap.descriptors>
<version.org.jboss.shrinkwrap.resolvers>2.2.7</version.org.jboss.shrinkwrap.resolvers>
<version.org.jboss.shrinkwrap.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap.shrinkwrap>
Expand All @@ -56,7 +56,7 @@
<galleon.fork.embedded>true</galleon.fork.embedded>

<!-- Test dependency versions -->
<version.org.wildfly.galleon-plugins>7.0.0.Final</version.org.wildfly.galleon-plugins>
<version.org.wildfly.galleon-plugins>7.3.0.Final</version.org.wildfly.galleon-plugins>
<version.jakarta.annotation.jakarta-annotation-api>2.1.1</version.jakarta.annotation.jakarta-annotation-api>
<version.jakarta.ejb.jakarta-ejb-api>4.0.1</version.jakarta.ejb.jakarta-ejb-api>
<version.jakarta.enterprise.cdi-api>4.0.1</version.jakarta.enterprise.cdi-api>
Expand Down

0 comments on commit 173f973

Please sign in to comment.