Add build commit information to artifacts 33/84433/2
authorOleg Beltz <olegb@amdocs.com>
Sun, 7 Apr 2019 05:26:50 +0000 (08:26 +0300)
committerAvi Gaffa <avi.gaffa@amdocs.com>
Sun, 7 Apr 2019 12:14:01 +0000 (12:14 +0000)
Change-Id: I38c230b8ebf3996300e4a5548ea807a020c3293b
Issue-ID: SDC-2222
Signed-off-by: Oleg Beltz <olegb@amdocs.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 60a5fb0..af318f7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -321,6 +321,11 @@ Modifications copyright (c) 2018 Nokia
                     <artifactId>yaml-json-validator-maven-plugin</artifactId>
                     <version>1.0.1</version>
                 </plugin>
+                <plugin>
+                    <groupId>pl.project13.maven</groupId>
+                    <artifactId>git-commit-id-plugin</artifactId>
+                    <version>2.2.6</version>
+                </plugin>
             </plugins>
         </pluginManagement>
 
@@ -426,6 +431,37 @@ Modifications copyright (c) 2018 Nokia
                     <printSummary>false</printSummary>
                 </configuration>
             </plugin>
+            <plugin>
+               <groupId>pl.project13.maven</groupId>
+               <artifactId>git-commit-id-plugin</artifactId>
+               <executions>
+                  <execution>
+                     <goals>
+                        <goal>revision</goal>
+                     </goals>
+                  </execution>
+               </executions>
+               <configuration>
+                  <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                  <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
+                  <failOnNoGitDirectory>true</failOnNoGitDirectory>
+                  <verbose>false</verbose>
+                  <includeOnlyProperties>
+                     <includeOnlyProperty>git.build.version</includeOnlyProperty>
+                     <includeOnlyProperty>git.build.time</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.id</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.time</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.user.name</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.user.email</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.message.short</includeOnlyProperty>
+                     <includeOnlyProperty>git.commit.message.full</includeOnlyProperty>
+                  </includeOnlyProperties>
+                  <gitDescribe>
+                     <skip>true</skip>
+                  </gitDescribe>
+                  <useNativeGit>false</useNativeGit>
+               </configuration>
+            </plugin>
         </plugins>
     </build>