This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new b59dc42410 ARTEMIS-4980: move sources jar creation to typical package 
phase, isolate to release profiles
b59dc42410 is described below

commit b59dc42410183190debf90a2dd9e30d7f27136dd
Author: Robbie Gemmell <[email protected]>
AuthorDate: Thu Aug 8 15:30:11 2024 +0100

    ARTEMIS-4980: move sources jar creation to typical package phase, isolate 
to release profiles
---
 artemis-core-client-all/pom.xml    | 48 ++++++++++++++------------------------
 artemis-jakarta-client-all/pom.xml | 48 ++++++++++++++------------------------
 artemis-jms-client-all/pom.xml     | 48 ++++++++++++++------------------------
 pom.xml                            | 42 ++++++++++++++++++---------------
 4 files changed, 74 insertions(+), 112 deletions(-)

diff --git a/artemis-core-client-all/pom.xml b/artemis-core-client-all/pom.xml
index 32d020b9e6..e415897337 100644
--- a/artemis-core-client-all/pom.xml
+++ b/artemis-core-client-all/pom.xml
@@ -38,44 +38,30 @@
    <build>
       <pluginManagement>
          <plugins>
-            <!-- Override root pom definition, so as to ensure the shading has 
a fresh base sources jar
-                 for the module before shading, with nothing much in it, and 
doesnt instead grab a large
-                 already-shaded remote snapshot, possibly each day (local) or 
on every build (CI) -->
+            <!-- Ensure the shading has a fresh base sources jar for the 
module before shading,
+                 with nothing much in it, and doesnt instead grab a large 
already-shaded remote
+                 snapshot, possibly each day (local) or on every build (CI) -->
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
-               <executions>
-                  <execution>
-                     <id>attach-sources</id>
-                     <phase>package</phase>
-                     <goals>
-                        <goal>jar-no-fork</goal>
-                     </goals>
-                     <configuration>
-                        <forceCreation>true</forceCreation>
-                     </configuration>
-                  </execution>
-               </executions>
+               <configuration>
+                  <forceCreation>true</forceCreation>
+               </configuration>
+            </plugin>
+            <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-jar-plugin</artifactId>
+               <configuration>
+                  <!-- Ensures the shading is always working upon a fresh base 
jar, which has
+                       nothing much in it, rather than potentially working on 
already-shaded
+                       output still present from prior runs and renamed to 
have the base name -->
+                  <forceCreation>true</forceCreation>
+               </configuration>
             </plugin>
          </plugins>
       </pluginManagement>
 
       <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>default-jar</id>
-                  <configuration>
-                     <!-- Ensures the shading is always working upon a fresh 
base jar, which has
-                          nothing much in it, rather than potentially working 
on already-shaded
-                          output still present from prior runs and renamed to 
have the base name -->
-                     <forceCreation>true</forceCreation>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-shade-plugin</artifactId>
@@ -86,7 +72,7 @@
                      <goal>shade</goal>
                   </goals>
                   <configuration>
-                     <createSourcesJar>true</createSourcesJar>
+                     
<createSourcesJar>${shade-plugin-create-sources}</createSourcesJar>
                      <shadeSourcesContent>true</shadeSourcesContent>
                      <filters>
                         <filter>
diff --git a/artemis-jakarta-client-all/pom.xml 
b/artemis-jakarta-client-all/pom.xml
index 20c211c0af..74766b1642 100644
--- a/artemis-jakarta-client-all/pom.xml
+++ b/artemis-jakarta-client-all/pom.xml
@@ -42,44 +42,30 @@
    <build>
       <pluginManagement>
          <plugins>
-            <!-- Override root pom definition, so as to ensure the shading has 
a fresh base sources jar
-                 for the module before shading, with nothing much in it, and 
doesnt instead grab a large
-                 already-shaded remote snapshot, possibly each day (local) or 
on every build (CI) -->
+            <!-- Ensure the shading has a fresh base sources jar for the 
module before shading,
+                 with nothing much in it, and doesnt instead grab a large 
already-shaded remote
+                 snapshot, possibly each day (local) or on every build (CI) -->
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
-               <executions>
-                  <execution>
-                     <id>attach-sources</id>
-                     <phase>package</phase>
-                     <goals>
-                        <goal>jar-no-fork</goal>
-                     </goals>
-                     <configuration>
-                        <forceCreation>true</forceCreation>
-                     </configuration>
-                  </execution>
-               </executions>
+               <configuration>
+                  <forceCreation>true</forceCreation>
+               </configuration>
+            </plugin>
+            <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-jar-plugin</artifactId>
+               <configuration>
+                  <!-- Ensures the shading is always working upon a fresh base 
jar, which has
+                       nothing much in it, rather than potentially working on 
already-shaded
+                       output still present from prior runs and renamed to 
have the base name -->
+                  <forceCreation>true</forceCreation>
+               </configuration>
             </plugin>
          </plugins>
       </pluginManagement>
 
       <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>default-jar</id>
-                  <configuration>
-                     <!-- Ensures the shading is always working upon a fresh 
base jar, which has
-                          nothing much in it, rather than potentially working 
on already-shaded
-                          output still present from prior runs and renamed to 
have the base name -->
-                     <forceCreation>true</forceCreation>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-shade-plugin</artifactId>
@@ -90,7 +76,7 @@
                      <goal>shade</goal>
                   </goals>
                   <configuration>
-                     <createSourcesJar>true</createSourcesJar>
+                     
<createSourcesJar>${shade-plugin-create-sources}</createSourcesJar>
                      <shadeSourcesContent>true</shadeSourcesContent>
                      <filters>
                         <filter>
diff --git a/artemis-jms-client-all/pom.xml b/artemis-jms-client-all/pom.xml
index e34418823c..d3a1869c14 100644
--- a/artemis-jms-client-all/pom.xml
+++ b/artemis-jms-client-all/pom.xml
@@ -38,44 +38,30 @@
    <build>
       <pluginManagement>
          <plugins>
-            <!-- Override root pom definition, so as to ensure the shading has 
a fresh base sources jar
-                 for the module before shading, with nothing much in it, and 
doesnt instead grab a large
-                 already-shaded remote snapshot, possibly each day (local) or 
on every build (CI) -->
+            <!-- Ensure the shading has a fresh base sources jar for the 
module before shading,
+                 with nothing much in it, and doesnt instead grab a large 
already-shaded remote
+                 snapshot, possibly each day (local) or on every build (CI) -->
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
-               <executions>
-                  <execution>
-                     <id>attach-sources</id>
-                     <phase>package</phase>
-                     <goals>
-                        <goal>jar-no-fork</goal>
-                     </goals>
-                     <configuration>
-                        <forceCreation>true</forceCreation>
-                     </configuration>
-                  </execution>
-               </executions>
+               <configuration>
+                  <forceCreation>true</forceCreation>
+               </configuration>
+            </plugin>
+            <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-jar-plugin</artifactId>
+               <configuration>
+                  <!-- Ensures the shading is always working upon a fresh base 
jar, which has
+                       nothing much in it, rather than potentially working on 
already-shaded
+                       output still present from prior runs and renamed to 
have the base name -->
+                  <forceCreation>true</forceCreation>
+               </configuration>
             </plugin>
          </plugins>
       </pluginManagement>
 
       <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>default-jar</id>
-                  <configuration>
-                     <!-- Ensures the shading is always working upon a fresh 
base jar, which has
-                          nothing much in it, rather than potentially working 
on already-shaded
-                          output still present from prior runs and renamed to 
have the base name -->
-                     <forceCreation>true</forceCreation>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-shade-plugin</artifactId>
@@ -86,7 +72,7 @@
                      <goal>shade</goal>
                   </goals>
                   <configuration>
-                     <createSourcesJar>true</createSourcesJar>
+                     
<createSourcesJar>${shade-plugin-create-sources}</createSourcesJar>
                      <shadeSourcesContent>true</shadeSourcesContent>
                      <filters>
                         <filter>
diff --git a/pom.xml b/pom.xml
index 997dfc6de0..d77ab6fc3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -220,6 +220,8 @@
       <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
+      <shade-plugin-create-sources>false</shade-plugin-create-sources>
+
       <maven.test.failure.ignore>false</maven.test.failure.ignore>
       
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
 
@@ -432,6 +434,9 @@
          <modules>
             <module>artemis-website</module>
          </modules>
+         <properties>
+            <shade-plugin-create-sources>true</shade-plugin-create-sources>
+         </properties>
          <build>
             <plugins>
                <plugin>
@@ -478,16 +483,32 @@
                      </execution>
                   </executions>
                </plugin>
+               <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-source-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                           <goal>jar-no-fork</goal>
+                        </goals>
+                     </execution>
+                  </executions>
+               </plugin>
             </plugins>
          </build>
       </profile>
-      <!-- Override the apache-release profile from the parent to skip creating
-           a source-release archive here, it is done in artemis-distribution. 
-->
       <profile>
          <id>apache-release</id>
+         <properties>
+            <shade-plugin-create-sources>true</shade-plugin-create-sources>
+         </properties>
          <build>
             <plugins>
                <plugin>
+                  <!-- Override the apache-release profile from the parent to 
skip creating
+                       a source-release archive here, it is done in 
artemis-distribution. -->
+                  <inherited>false</inherited>
                   <artifactId>maven-assembly-plugin</artifactId>
                   <executions>
                      <execution>
@@ -824,20 +845,6 @@
                <artifactId>transformer-tools-mvn</artifactId>
                <version>${version.batavia}</version>
             </plugin>
-            <plugin>
-               <inherited>true</inherited>
-               <groupId>org.apache.maven.plugins</groupId>
-               <artifactId>maven-source-plugin</artifactId>
-               <executions>
-                  <execution>
-                     <id>attach-sources</id>
-                     <phase>verify</phase>
-                     <goals>
-                        <goal>jar-no-fork</goal>
-                     </goals>
-                  </execution>
-               </executions>
-            </plugin>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
@@ -1065,9 +1072,6 @@
                <noindex>true</noindex>
             </configuration>
          </plugin>
-         <plugin>
-            <artifactId>maven-source-plugin</artifactId>
-         </plugin>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-help-plugin</artifactId>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to