From 3450c3d99ecaaf46231feb2c404b72d1727517e1 Mon Sep 17 00:00:00 2001
From: Antoine Rey <antoine.rey@gmail.com>
Date: Mon, 17 Oct 2016 08:23:28 +0200
Subject: [PATCH] Add Git commit information to the /manage/info endpoint

---
 pom.xml | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index aa14247..1b6a5ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -207,6 +207,26 @@
                 </executions>
             </plugin>
 
+            <!-- Spring Boot Actuator displays build-related information if a git.properties file is present at the classpath  -->
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>revision</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <verbose>true</verbose>
+                    <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
+                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
+                    </generateGitPropertiesFilename>
+                </configuration>
+            </plugin>
+
             <plugin>
                 <!--
                 right now lesscss maven plugin does NOT support @Import from classpath
@@ -232,7 +252,8 @@
                                     <artifactId>bootstrap</artifactId>
                                     <version>3.3.6</version>
                                     <overWrite>false</overWrite>
-                                    <outputDirectory>${project.basedir}/src/main/webapp/resources/generated</outputDirectory>
+                                    <outputDirectory>${project.basedir}/src/main/webapp/resources/generated
+                                    </outputDirectory>
                                     <includes>**/*.less</includes>
                                 </artifactItem>
                             </artifactItems>
-- 
GitLab