From 1d1a33691871e8e40a908494a21e38ad8368e8e4 Mon Sep 17 00:00:00 2001 From: Jean-Francois Denise Date: Thu, 21 Dec 2023 09:45:58 +0100 Subject: [PATCH] Fix for WFMP-234, Allows to exclude some archives when scanning with WildFly Glow --- .../org/wildfly/plugin/provision/GlowConfig.java | 16 ++++++++++++++++ .../plugin/provision/PackageServerMojo.java | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/org/wildfly/plugin/provision/GlowConfig.java b/plugin/src/main/java/org/wildfly/plugin/provision/GlowConfig.java index afbae180..9bb10d81 100644 --- a/plugin/src/main/java/org/wildfly/plugin/provision/GlowConfig.java +++ b/plugin/src/main/java/org/wildfly/plugin/provision/GlowConfig.java @@ -25,6 +25,7 @@ public class GlowConfig { private String version; private boolean suggest; private Set layersForJndi = Set.of(); + private Set excludedArchives = Set.of(); private boolean failsOnError = true; private boolean preview; @@ -38,6 +39,7 @@ public Arguments toArguments(Path deployment, Path inProvisioning) { .setUserEnabledAddOns(addOns).setBinaries(lst).setSuggest(suggest).setJndiLayers(getLayersForJndi()) .setVersion(version) .setTechPreview(preview) + .setExcludeArchivesFromScan(excludedArchives) .setOutput(OutputFormat.PROVISIONING_XML); if (inProvisioning != null) { builder.setProvisoningXML(inProvisioning); @@ -156,4 +158,18 @@ public void setPreview(boolean preview) { public boolean isPreview() { return preview; } + + /** + * @return the excludedArchives + */ + public Set getExcludedArchives() { + return excludedArchives; + } + + /** + * @param excludedArchives the excludedArchives to set + */ + public void setExcludedArchives(Set excludedArchives) { + this.excludedArchives = Set.copyOf(excludedArchives); + } } diff --git a/plugin/src/main/java/org/wildfly/plugin/provision/PackageServerMojo.java b/plugin/src/main/java/org/wildfly/plugin/provision/PackageServerMojo.java index cbd6f98e..60ca2779 100644 --- a/plugin/src/main/java/org/wildfly/plugin/provision/PackageServerMojo.java +++ b/plugin/src/main/java/org/wildfly/plugin/provision/PackageServerMojo.java @@ -191,12 +191,16 @@ public class PackageServerMojo extends AbstractProvisionServerMojo { *
  • profile: {@code ha}. Default being non ha server configuration.
  • *
  • suggest: {@code true} | {@code false}. Display addOns that you can use to enhance discovered provisioning * configuration. Default to {@code false}.
  • + *
  • excludedArchives: List of archives contained in the deployment to exclude when scanning. + * Wildcards ({@code *}) are allowed. N.B. Just the name of the archive is matched, do not attempt + * to specify a full path within the jar. The following examples would be valid exclusions: {@code my-jar.jar}, + * {@code *-internal.rar}.
  • *
  • version: server version. Default being the latest released version.
  • * * * * - * For example, cloud, ha profile with CLI and openapi addOns enabled. mail layer eing explicitly included: + * For example, cloud, ha profile with CLI and openapi addOns enabled. mail layer being explicitly included: * *
          *   <discover-provisioning-info>