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

rec pushed a commit to branch 
feature/UIMA-6440-Stage-release-artifacts-as-part-of-the-build
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit 989a9427a9e3a80bc58b998f0651d85016f1e373
Author: Richard Eckart de Castilho <[email protected]>
AuthorDate: Mon May 2 12:00:28 2022 +0200

    [UIMA-6440] Stage release artifacts as part of the build
    
    - Add several plugins and executions to the apache-release profile in the 
top-level POM to auto-stage the release candidate during a release build
    - Removed unused 'assemblyFinalName' property
---
 pom.xml              | 103 +++++++++++++++++++++++++++++++++++++++++++++++++--
 uimaj-parent/pom.xml |   2 +-
 2 files changed, 101 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index dcadfab9f..189de239e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,6 @@
 
   <properties>
     <jiraVersion>3.2.0SDK</jiraVersion>   
-    <assemblyFinalName>uimaj-${project.version}</assemblyFinalName> 
     
<assemblyBinDescriptor>src/main/assembly/bin-without-jackson.xml</assemblyBinDescriptor>
 
     <postNoticeText>${ibmNoticeText}</postNoticeText>    
   </properties>
@@ -323,6 +322,13 @@
     
     <profile>
       <id>apache-release</id>
+
+      <properties>
+        <releaseCandidateNum></releaseCandidateNum>
+        
<staging-scm-root>scm:svn:https://dist.apache.org/repos/dist/dev/uima/</staging-scm-root>
+        
<staging-local-root>${project.build.directory}/staging</staging-local-root>
+        
<staging-folder>${project.artifactId}-${project.version}-RC-${staging-timestamp}-${candidate-id}</staging-folder>
+      </properties>
       
       <build>
         <!-- Run jira report -->
@@ -330,6 +336,7 @@
         <plugins>
           <plugin>
             <artifactId>maven-changes-plugin</artifactId>
+            <inherited>false</inherited>
             <executions>
               <execution>
                 <id>default-cli</id>
@@ -337,9 +344,99 @@
                   <fixVersionIds>${jiraVersion}</fixVersionIds>
                 </configuration>
               </execution>
-            </executions>  
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>buildnumber-maven-plugin</artifactId>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>generate-candidate-id</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>create</goal>
+                </goals>
+                <configuration>
+                  
<buildNumberPropertyName>candidate-id</buildNumberPropertyName>
+                  
<timestampPropertyName>staging-timestamp</timestampPropertyName>
+                  <shortRevisionLength>7</shortRevisionLength>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <phase>install</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <target>
+                    <mkdir dir="${staging-local-root}/${staging-folder}" />
+                    <copy todir="${staging-local-root}/${staging-folder}">
+                      <fileset dir="${project.build.directory}">
+                        <include name="uimaj-${project.version}-*.zip"/>
+                        <include name="uimaj-${project.version}-*.zip.asc"/>
+                        <include name="uimaj-${project.version}-*.zip.sha512"/>
+                        <include name="uimaj-${project.version}-*.tar.gz"/>
+                        <include name="uimaj-${project.version}-*.tar.gz.asc"/>
+                        <include 
name="uimaj-${project.version}-*.tar.gz.sha512"/>
+                      </fileset>
+                    </copy>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
           </plugin>
-        </plugins>     
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-scm-plugin</artifactId>
+            <inherited>false</inherited>
+            <configuration>
+              <connectionType>developerConnection</connectionType>
+              
<developerConnectionUrl>${staging-scm-root}</developerConnectionUrl>
+            </configuration>
+            <executions>
+              <execution>
+                <id>checkout-staging</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>checkout</goal>
+                </goals>
+                <configuration>
+                  <checkoutDirectory>${staging-local-root}</checkoutDirectory>
+                </configuration>
+              </execution>
+              <execution>
+                <id>add-staging-files</id>
+                <phase>deploy</phase>
+                <goals>
+                  <goal>add</goal>
+                </goals>
+                <configuration>
+                  <basedir>${staging-local-root}</basedir>
+                  <includes>${staging-folder}/**/*</includes>
+                </configuration>
+              </execution>
+              <execution>
+                <id>commit-staging-files</id>
+                <phase>deploy</phase>
+                <goals>
+                  <goal>checkin</goal>
+                </goals>
+                <configuration>
+                  <basedir>${staging-local-root}</basedir>
+                  <message>Staging release artifacts for 
${project.artifactId}-${project.version}-RC-${staging-timestamp}-${candidate-id}</message>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
       </build>
     </profile>
     
diff --git a/uimaj-parent/pom.xml b/uimaj-parent/pom.xml
index 2331b13d8..ef0c1fc46 100644
--- a/uimaj-parent/pom.xml
+++ b/uimaj-parent/pom.xml
@@ -34,7 +34,7 @@
     <groupId>org.apache.uima</groupId>
     <artifactId>parent-pom</artifactId>
     <relativePath />
-    <version>14</version>
+    <version>15-SNAPSHOT</version>
   </parent>
 
   <artifactId>uimaj-parent</artifactId>

Reply via email to