You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bb...@apache.org on 2024/01/16 21:48:48 UTC

(hbase) branch branch-2.5 updated: HBASE-28306 Add property to customize Version information (#5621)

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

bbeaudreault pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new e431c9d8498 HBASE-28306 Add property to customize Version information (#5621)
e431c9d8498 is described below

commit e431c9d8498b52defd67345fbcc67b1ecbbeb1fa
Author: Bryan Beaudreault <bb...@apache.org>
AuthorDate: Tue Jan 16 16:42:52 2024 -0500

    HBASE-28306 Add property to customize Version information (#5621)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 hbase-common/pom.xml | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index 709af19cff0..427893f68e2 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -31,6 +31,15 @@
   <name>Apache HBase - Common</name>
   <description>Common functionality for HBase</description>
 
+  <properties>
+    <!--
+    During build, one can override this property if they want to influence the
+    version stamped in the generated Version.java and hbase-default.xml. This has
+    implications for various version-related guardrails so care should be taken.
+    -->
+    <versioninfo.version>${project.version}</versioninfo.version>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.hbase</groupId>
@@ -200,7 +209,7 @@
             <phase>process-resources</phase>
             <configuration>
               <target>
-                <replace file="${project.build.outputDirectory}/hbase-default.xml" token="@@@VERSION@@@" value="${project.version}"/>
+                <replace file="${project.build.outputDirectory}/hbase-default.xml" token="@@@VERSION@@@" value="${versioninfo.version}"/>
               </target>
             </configuration>
           </execution>
@@ -216,7 +225,7 @@
                 <property location="${project.build.directory}/generated-sources" name="generated.sources"/>
 
                 <exec executable="bash" failonerror="true">
-                  <arg line="${basedir}/src/saveVersion.sh ${project.version} ${generated.sources}/java"/>
+                  <arg line="${basedir}/src/saveVersion.sh ${versioninfo.version} ${generated.sources}/java"/>
                 </exec>
               </target>
             </configuration>