TCA:Included git information in tca jars 67/20867/1
authorSingla, Rajiv (rs153v) <rs153v@att.com>
Thu, 26 Oct 2017 20:56:21 +0000 (16:56 -0400)
committerSingla, Rajiv (rs153v) <rs153v@att.com>
Thu, 26 Oct 2017 20:56:58 +0000 (16:56 -0400)
Change-Id: I3e45d6ccdd10a526f0eb78fb228b8d02c528fcc3
Signed-off-by: Singla, Rajiv (rs153v) <rs153v@att.com>
Issue-Id: DCAEGEN2-182

pom.xml

diff --git a/pom.xml b/pom.xml
index 7521682..f6ef4c5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <jar.plugin.version>2.4</jar.plugin.version>\r
         <lombok.plugin.version>1.16.10.0</lombok.plugin.version>\r
         <jgitflow.plugin.version>1.0-m5.1</jgitflow.plugin.version>\r
+        <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>\r
         <maven.site.plugin>3.5.1</maven.site.plugin>\r
         <jxr.plugin.version>2.5</jxr.plugin.version>\r
         <project.info.reports.plugin.version>2.7</project.info.reports.plugin.version>\r
         <checkstyle.suppression.file.name>suppressions.xml</checkstyle.suppression.file.name>       \r
         <dependency.locations.enabled>false</dependency.locations.enabled>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
-    <snapshots.path>content/repositories/snapshots/</snapshots.path>\r
-      <releases.path>content/repositories/releases/</releases.path>\r
-      <site.path>content/sites/site/org/onap/dcaegen2/analytics/tca/${project.artifactId}/${project.version}</site.path>\r
+        <snapshots.path>content/repositories/snapshots/</snapshots.path>\r
+        <releases.path>content/repositories/releases/</releases.path>\r
+        <site.path>\r
+            content/sites/site/org/onap/dcaegen2/analytics/tca/${project.artifactId}/${project.version}\r
+        </site.path>\r
     </properties>\r
 \r
     <dependencyManagement>\r
 \r
     <build>\r
 \r
+        <resources>\r
+            <resource>\r
+                <directory>${project.basedir}/src/main/resources</directory>\r
+            </resource>\r
+            <resource>\r
+                <directory>${project.build.directory}/git</directory>\r
+            </resource>\r
+        </resources>\r
+\r
         <extensions>\r
             <extension>\r
                 <groupId>org.apache.maven.wagon</groupId>\r
                     </executions>\r
                 </plugin>\r
 \r
+                <!-- GIT COMMIT ID PLUGIN -->\r
+                <plugin>\r
+                    <groupId>pl.project13.maven</groupId>\r
+                    <artifactId>git-commit-id-plugin</artifactId>\r
+                    <version>${gitcommitid.plugin.version}</version>\r
+                    <executions>\r
+                        <execution>\r
+                            <id>generate-git-properties</id>\r
+                            <phase>generate-resources</phase>\r
+                            <goals>\r
+                                <goal>revision</goal>\r
+                            </goals>\r
+                            <configuration>\r
+                                <failOnNoGitDirectory>false</failOnNoGitDirectory>\r
+                                <generateGitPropertiesFile>true</generateGitPropertiesFile>\r
+                                <generateGitPropertiesFilename>\r
+                                    ${project.build.directory}/git/git.properties\r
+                                </generateGitPropertiesFilename>\r
+                            </configuration>\r
+                        </execution>\r
+                    </executions>\r
+                </plugin>\r
 \r
                 <!-- JGIT FLOW PLUGIN -->\r
                 <plugin>\r
                 <artifactId>jgitflow-maven-plugin</artifactId>\r
             </plugin>\r
 \r
+            <plugin>\r
+                <groupId>pl.project13.maven</groupId>\r
+                <artifactId>git-commit-id-plugin</artifactId>\r
+            </plugin>\r
+\r
         </plugins>\r
     </build>\r
 \r
         <module>dcae-analytics-aai</module>\r
     </modules>\r
 \r
-</project>
+</project>\r