Merge branch 'master' of https://github.com/floodlight/loxigen
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index cc480df..9845e87 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -148,6 +148,74 @@
                     <downloadJavadocs>true</downloadJavadocs>
                 </configuration>
             </plugin>
+            <!-- use maven git-commit-id plugin to provide vcs metadata -->
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+                <version>2.1.5</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>revision</goal>
+                        </goals>
+                    </execution>
+                </executions>
+
+                <configuration>
+                    <!-- our BuildInfoManager expects dates to be in ISO-8601 format -->
+                    <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
+
+                    <verbose>true</verbose>
+
+                    <skipPoms>true</skipPoms>
+                    <generateGitPropertiesFile>false</generateGitPropertiesFile>
+                    <dotGitDirectory>${project.basedir}/../../.git</dotGitDirectory>
+                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
+
+                    <gitDescribe>
+                        <skip>false</skip>
+                        <always>true</always>
+                        <abbrev>7</abbrev>
+                        <dirty>-dirty</dirty>
+                        <forceLongFormat>false</forceLongFormat>
+                    </gitDescribe>
+                </configuration>
+            </plugin>
+            <!-- include git info in generated jars -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.projectfloodlight.core.Main</mainClass>
+                        </manifest>
+                        <manifestSections>
+                            <manifestSection>
+                                <name>Floodlight-buildinfo</name>
+                                <manifestEntries>
+                                    <projectName>${project.name}</projectName>
+                                    <version>${project.version}</version>
+                                    <vcsRevision>${git.commit.id.abbrev}</vcsRevision>
+                                    <vcsBranch>${git.branch}</vcsBranch>
+                                    <vcsDirty>${git.commit.id.describe}</vcsDirty>
+                                    <buildUser>${user.name}</buildUser>
+                                    <buildDate>${git.build.time}</buildDate>
+                                </manifestEntries>
+                            </manifestSection>
+                        </manifestSections>
+                    </archive>
+                </configuration>
+            </plugin>
+
             <!--
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>