You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/10/04 15:09:29 UTC

[commons-rng] branch master updated (8aabac1e -> 32ac6ac9)

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

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


    from 8aabac1e Add note about matched versions required for client-api and core
     new bde19975 Explicit project prefix for filtered properties.
     new 32ac6ac9 Add sign-and-deploy of generated BOM when using GPG

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commons-rng-bom/pom.xml                            | 131 +++++++++++++++++----
 .../src/main/resources-filtered/bom.xml            |  10 +-
 2 files changed, 114 insertions(+), 27 deletions(-)


[commons-rng] 01/02: Explicit project prefix for filtered properties.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit bde199755a6cf7649ed7d17e5103978d2d82f14c
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Oct 4 15:35:19 2022 +0100

    Explicit project prefix for filtered properties.
---
 commons-rng-bom/src/main/resources-filtered/bom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/commons-rng-bom/src/main/resources-filtered/bom.xml b/commons-rng-bom/src/main/resources-filtered/bom.xml
index 288c0e9b..f7163958 100644
--- a/commons-rng-bom/src/main/resources-filtered/bom.xml
+++ b/commons-rng-bom/src/main/resources-filtered/bom.xml
@@ -21,12 +21,12 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <version>${version}</version>
+  <groupId>${project.groupId}</groupId>
+  <artifactId>${project.artifactId}</artifactId>
+  <version>${project.version}</version>
   <packaging>pom</packaging>
-  <name>${name}</name>
-  <description>${description}</description>
+  <name>${project.name}</name>
+  <description>${project.description}</description>
   <url>${parent.url}</url>
 
   <dependencyManagement>


[commons-rng] 02/02: Add sign-and-deploy of generated BOM when using GPG

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 32ac6ac9c2b335f7d9abec61c8da0f4870896ff2
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Oct 4 16:07:57 2022 +0100

    Add sign-and-deploy of generated BOM when using GPG
    
    This is used for the commons release process to sign the correct
    artifact.
---
 commons-rng-bom/pom.xml | 131 ++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 109 insertions(+), 22 deletions(-)

diff --git a/commons-rng-bom/pom.xml b/commons-rng-bom/pom.xml
index 1264c534..cf126adc 100644
--- a/commons-rng-bom/pom.xml
+++ b/commons-rng-bom/pom.xml
@@ -185,7 +185,9 @@
         </executions>
       </plugin>
       <!-- The install and deploy plugin goals are skipped.
-           Here we install and deploy the generated BOM file as the project artifact. -->
+           Here we install the generated BOM file as the project artifact.
+           The deploy is performed by different plugins configured in profiles 
+           depending if GPG signing is required. -->
       <plugin>
         <artifactId>maven-install-plugin</artifactId>
         <executions>
@@ -204,27 +206,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>deploy-bom</id>
-            <goals>
-              <goal>deploy-file</goal>
-            </goals>
-            <phase>deploy</phase>
-            <configuration>
-              <!-- Dynamically configured destination based on SNAPSHOT or test-deploy profile -->
-              <url>${bom.url}</url>
-              <repositoryId>${bom.repositoryId}</repositoryId>
-              <file>${rng.bom.file}</file>
-              <!-- Collect group, artifact, version and packaging from the BOM -->
-              <pomFile>${rng.bom.file}</pomFile>
-              <generatePom>false</generatePom>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 
@@ -239,6 +220,112 @@
         <rng.bom.releases.url>file:target/deploy</rng.bom.releases.url>
       </properties>
     </profile>
+
+    <profile>
+      <!-- Changes to the commons-parent release profile -->
+      <id>release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-gpg-plugin</artifactId>
+            <executions>
+              <!-- Skip the signing of the project artifact performed by commons-parent
+                (i.e. the pom) to avoid generating additional .asc files in the target
+                directory. These are mistakenly deployed in addition to the desired asc
+                file from signing the genreated BOM. -->
+              <execution>
+                <id>sign-artifacts</id>
+                <goals>
+                  <goal>sign</goal>
+                </goals>
+                <configuration>
+                  <skip>true</skip>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Activate the appropriate deploy goal.
+         If both profiles are actived (using the profile ids) then this will deploy the same
+         artifact twice with different build timestamps; only one is present in the metadata.
+         The GPG signature is valid for either as it has no build timestamp. -->
+    <profile>
+      <!-- deploy -->
+      <id>release-deploy</id>
+      <activation>
+        <property>
+          <name>gpg.skip</name>
+          <!-- This ignores the value for simplicity to allow -Dgpg.skip to activate.
+               The side-effect being that -Dgpg.skip=false will still activate the profile.
+               This is only relevant for the deploy phase and impacts the release process. -->
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-deploy-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>deploy-bom</id>
+                <goals>
+                  <goal>deploy-file</goal>
+                </goals>
+                <phase>deploy</phase>
+                <configuration>
+                  <!-- Dynamically configured destination based on SNAPSHOT or test-deploy profile -->
+                  <url>${bom.url}</url>
+                  <repositoryId>${bom.repositoryId}</repositoryId>
+                  <file>${rng.bom.file}</file>
+                  <!-- Collect group, artifact, version and packaging from the BOM -->
+                  <pomFile>${rng.bom.file}</pomFile>
+                  <generatePom>false</generatePom>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <profile>
+      <!-- sign and deploy -->
+      <id>release-sign-and-deploy</id>
+      <activation>
+        <property>
+          <!-- Opposite of the deploy profile -->
+          <name>!gpg.skip</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-gpg-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>deploy-bom</id>
+                <goals>
+                  <goal>sign-and-deploy-file</goal>
+                </goals>
+                <phase>deploy</phase>
+                <configuration>
+                  <!-- Dynamically configured destination based on SNAPSHOT or test-deploy profile -->
+                  <url>${bom.url}</url>
+                  <repositoryId>${bom.repositoryId}</repositoryId>
+                  <file>${rng.bom.file}</file>
+                  <!-- Collect group, artifact, version and packaging from the BOM -->
+                  <pomFile>${rng.bom.file}</pomFile> 
+                  <generatePom>false</generatePom>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
   </profiles>
 
 </project>