From dec6e96077d2f9857c3fc516e41c5c5c01c4fbf2 Mon Sep 17 00:00:00 2001 From: Jean Francois Denise Date: Wed, 3 Apr 2024 12:26:31 +0200 Subject: [PATCH 1/2] Upgrade to Galleon 6.0.0.Beta6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ebdb2cfb..9a45552f 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ 1.0.1 3.1.0 1.1.0 - 6.0.0.Beta5 + 6.0.0.Beta6 1.5.0.Final 1.0.5.Final From 4bdefa363c418e9468dc93012f6083b2f2c52ed0 Mon Sep 17 00:00:00 2001 From: Jean Francois Denise Date: Wed, 3 Apr 2024 12:28:03 +0200 Subject: [PATCH 2/2] Fix for WFGP-279, Enforce that minimum stability enables the specified stability --- .../maven/AbstractFeaturePackBuildMojo.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/maven-plugin/src/main/java/org/wildfly/galleon/maven/AbstractFeaturePackBuildMojo.java b/maven-plugin/src/main/java/org/wildfly/galleon/maven/AbstractFeaturePackBuildMojo.java index 75c11704..401ddcf8 100644 --- a/maven-plugin/src/main/java/org/wildfly/galleon/maven/AbstractFeaturePackBuildMojo.java +++ b/maven-plugin/src/main/java/org/wildfly/galleon/maven/AbstractFeaturePackBuildMojo.java @@ -266,6 +266,8 @@ public void execute() throws MojoExecutionException, MojoFailureException { defaultConfigStabilityLevel = Stability.fromString(stabilityLevel); defaultPackageStabilityLevel = Stability.fromString(stabilityLevel); } + // Check that the minimum Stability level enables the stability level + checkStabilityLevels(buildTimestabilityLevel, defaultConfigStabilityLevel, defaultPackageStabilityLevel); artifactVersions = MavenProjectArtifactVersions.getInstance(project); doExecute(); } catch (RuntimeException | Error | MojoExecutionException | MojoFailureException e) { @@ -273,6 +275,18 @@ public void execute() throws MojoExecutionException, MojoFailureException { } } + private static void checkStabilityLevels(Stability min, Stability config, Stability pkg) throws MojoExecutionException { + min = min == null ? Stability.DEFAULT : min; + config = config == null ? Stability.DEFAULT : config; + pkg = pkg == null ? Stability.DEFAULT : pkg; + if (!min.enables(config)) { + throw new MojoExecutionException("The minimum stability " + min + " doesn't enable the config stability " + config); + } + if (!min.enables(pkg)) { + throw new MojoExecutionException("The minimum stability " + min + " doesn't enable the package stability " + pkg); + } + } + protected Map getFpDependencies() { return fpDependencies; }