From 2399984e69904f94223ef5d426986d390ccd06ad Mon Sep 17 00:00:00 2001 From: Jean-Francois Denise Date: Tue, 17 Sep 2024 15:36:49 +0200 Subject: [PATCH 1/2] Shaded jar construction at provisioning time --- cli/assembly.xml | 21 +++++++++ cli/pom.xml | 45 +++++++++++++++++++ core-feature-pack/common/pom.xml | 12 ----- .../packages/core.misc.common/package.xml | 2 + .../main/resources/packages/tools/package.xml | 8 ++++ .../packages/tools/pm/wildfly/tasks.xml | 6 +-- .../galleon-feature-pack/pom.xml | 32 +++++++++++++ elytron-tool-wrapper/assembly.xml | 21 +++++++++ elytron-tool-wrapper/pom.xml | 43 +++++++++++++----- pom.xml | 8 +--- 10 files changed, 164 insertions(+), 34 deletions(-) create mode 100644 cli/assembly.xml create mode 100644 core-feature-pack/galleon-common/src/main/resources/packages/tools/package.xml create mode 100644 elytron-tool-wrapper/assembly.xml diff --git a/cli/assembly.xml b/cli/assembly.xml new file mode 100644 index 00000000000..d09a4ef3b08 --- /dev/null +++ b/cli/assembly.xml @@ -0,0 +1,21 @@ + + + shaded-model + + zip + + false + + + target/resources + + + + + + pom.xml + + + + diff --git a/cli/pom.xml b/cli/pom.xml index 4076389fdad..78add71788b 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -58,6 +58,51 @@ + + org.wildfly.galleon-plugins + wildfly-galleon-maven-plugin + + org.jboss.as.cli.CommandLineMain + + true + + ${embedding.jar.jpms.exports} + ${embedding.jar.jpms.opens} + + + + + package + + generate-shaded-descriptor + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble + package + + single + + + + assembly.xml + + true + ${project.build.finalName}-shaded + true + ${project.build.directory} + ${project.build.directory}/assembly/work + gnu + + + + org.apache.maven.plugins maven-shade-plugin diff --git a/core-feature-pack/common/pom.xml b/core-feature-pack/common/pom.xml index f7834fb9d02..ecc5af38dba 100644 --- a/core-feature-pack/common/pom.xml +++ b/core-feature-pack/common/pom.xml @@ -635,18 +635,6 @@ wildfly-cli - - org.wildfly.core - wildfly-cli - client - - - * - * - - - - org.wildfly.core wildfly-deployment-scanner diff --git a/core-feature-pack/galleon-common/src/main/resources/packages/core.misc.common/package.xml b/core-feature-pack/galleon-common/src/main/resources/packages/core.misc.common/package.xml index 77714b07ed4..9487f3bc1fb 100644 --- a/core-feature-pack/galleon-common/src/main/resources/packages/core.misc.common/package.xml +++ b/core-feature-pack/galleon-common/src/main/resources/packages/core.misc.common/package.xml @@ -10,5 +10,7 @@ + + \ No newline at end of file diff --git a/core-feature-pack/galleon-common/src/main/resources/packages/tools/package.xml b/core-feature-pack/galleon-common/src/main/resources/packages/tools/package.xml new file mode 100644 index 00000000000..4346e3dec48 --- /dev/null +++ b/core-feature-pack/galleon-common/src/main/resources/packages/tools/package.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/core-feature-pack/galleon-common/src/main/resources/packages/tools/pm/wildfly/tasks.xml b/core-feature-pack/galleon-common/src/main/resources/packages/tools/pm/wildfly/tasks.xml index 1bad2d644eb..011483f6864 100644 --- a/core-feature-pack/galleon-common/src/main/resources/packages/tools/pm/wildfly/tasks.xml +++ b/core-feature-pack/galleon-common/src/main/resources/packages/tools/pm/wildfly/tasks.xml @@ -5,10 +5,10 @@ ~ SPDX-License-Identifier: Apache-2.0 --> - + - - + + diff --git a/core-feature-pack/galleon-feature-pack/pom.xml b/core-feature-pack/galleon-feature-pack/pom.xml index c5d4228a243..378d638f015 100644 --- a/core-feature-pack/galleon-feature-pack/pom.xml +++ b/core-feature-pack/galleon-feature-pack/pom.xml @@ -26,6 +26,8 @@ ${basedir}/../common/src/main/resources ${basedir}/../ee-10-api/src/main/resources ${basedir}/../galleon-common/src/main/resources + ${basedir}/../../cli/target/resources + ${basedir}/../../elytron-tool-wrapper/target/resources @@ -175,6 +177,36 @@ + + copy-galleon-cli-shaded-resources + process-resources + + copy-resources + + + ${basedir}/target/resources + + + ${galleon-cli-shaded.resources.directory} + + + + + + copy-galleon-elytron-tools-shaded-resources + process-resources + + copy-resources + + + ${basedir}/target/resources + + + ${galleon-elytron-tools-shaded.resources.directory} + + + + copy-resources process-resources diff --git a/elytron-tool-wrapper/assembly.xml b/elytron-tool-wrapper/assembly.xml new file mode 100644 index 00000000000..d09a4ef3b08 --- /dev/null +++ b/elytron-tool-wrapper/assembly.xml @@ -0,0 +1,21 @@ + + + shaded-model + + zip + + false + + + target/resources + + + + + + pom.xml + + + + diff --git a/elytron-tool-wrapper/pom.xml b/elytron-tool-wrapper/pom.xml index b21b0b2bc55..10ad87cb267 100644 --- a/elytron-tool-wrapper/pom.xml +++ b/elytron-tool-wrapper/pom.xml @@ -21,25 +21,44 @@ - org.apache.maven.plugins - maven-shade-plugin + org.wildfly.galleon-plugins + wildfly-galleon-maven-plugin - false - - - org.wildfly.core.elytron.tool.wrapper.ElytronToolScriptWrapper - - true - - - + org.wildfly.core.elytron.tool.wrapper.ElytronToolScriptWrapper + + true + package - shade + generate-shaded-descriptor + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble + package + + single + + + assembly.xml + + true + ${project.build.finalName}-shaded + true + ${project.build.directory} + ${project.build.directory}/assembly/work + gnu + diff --git a/pom.xml b/pom.xml index a41c6a8f418..ef3f90e2b55 100644 --- a/pom.xml +++ b/pom.xml @@ -127,7 +127,7 @@ 0.8.10 6.0.3.Final 1.0.8.Final - 7.1.2.Final + 7.1.3.Final-SNAPSHOT 1.0.0 5.0.1.Final @@ -1332,12 +1332,6 @@ wildfly-cli ${project.version} - - org.wildfly.core - wildfly-cli - ${project.version} - client - org.wildfly.core wildfly-controller From 6e6af87a57cfa17ba7c93c3ceda9bb2110be1a7d Mon Sep 17 00:00:00 2001 From: Jean-Francois Denise Date: Wed, 18 Sep 2024 15:32:03 +0200 Subject: [PATCH 2/2] Add back cloent shaded jar dep --- core-feature-pack/common/pom.xml | 12 ++++++++++++ pom.xml | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/core-feature-pack/common/pom.xml b/core-feature-pack/common/pom.xml index ecc5af38dba..f7834fb9d02 100644 --- a/core-feature-pack/common/pom.xml +++ b/core-feature-pack/common/pom.xml @@ -635,6 +635,18 @@ wildfly-cli + + org.wildfly.core + wildfly-cli + client + + + * + * + + + + org.wildfly.core wildfly-deployment-scanner diff --git a/pom.xml b/pom.xml index ef3f90e2b55..865c3fc2363 100644 --- a/pom.xml +++ b/pom.xml @@ -1332,6 +1332,12 @@ wildfly-cli ${project.version} + + org.wildfly.core + wildfly-cli + ${project.version} + client + org.wildfly.core wildfly-controller