Commit 4b5f11e0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

git info export is moved to maven (from ant)

parent 78606521
......@@ -64,7 +64,7 @@
</target>
<target name="maven-build" depends="gitversion, maven-build-windows, maven-build-unix" />
<target name="maven-build" depends="maven-build-windows, maven-build-unix" />
<target name="maven-build-windows" if="isWindows">
<exec dir="." executable="cmd">
......@@ -78,7 +78,7 @@
</exec>
</target>
<target name="maven-build-with-doc" depends="gitversion, maven-build-with-doc-windows, maven-build-with-doc-unix" />
<target name="maven-build-with-doc" depends="maven-build-with-doc-windows, maven-build-with-doc-unix" />
<target name="maven-build-with-doc-windows" if="isWindows">
<exec dir="." executable="cmd">
......@@ -115,25 +115,6 @@
</target>
<target name="gitversion">
<exec executable="git" outputproperty="gitversion">
<arg value="rev-parse" />
<arg value="HEAD" />
</exec>
<tstamp>
<format property="build.time" pattern="dd/MM/yyyy HH:mm" unit="hour" />
</tstamp>
<echo>GIT Version: ${gitversion}
Build timestamp: ${build.time}
</echo>
<echo file="web/src/main/webapp/version.txt">${gitversion}
${build.time}
</echo>
<copy file="CHANGELOG" tofile="web/src/main/webapp/CHANGELOG" overwrite="true" />
</target>
<target name="debian-pkg" depends="maven-build">
<exec executable="debian/create-debian-pkg.sh" />
</target>
......
......@@ -117,7 +117,8 @@
<surefire-api.version>2.22.2</surefire-api.version>
<hsqldb.version>2.5.0</hsqldb.version>
<git-commit-id-plugin.version>4.0.4</git-commit-id-plugin.version>
<surefire.rerunFailingTestsCount>4</surefire.rerunFailingTestsCount>
</properties>
......
......@@ -353,7 +353,21 @@
<directory>${project.build.directory}/generated-docs</directory>
<targetPath>docs/</targetPath>
</resource>
<resource>
<directory>${project.basedir}/../</directory>
<targetPath>.</targetPath>
<includes>
<include>CHANGELOG</include>
</includes>
</resource>
</webResources>
<archive>
<manifestEntries>
<git-version>${git.commit.id}</git-version>
<git-timestamp>${git.commit.time}</git-timestamp>
<version>${project.version}</version>
</manifestEntries>
</archive>
</configuration>
</plugin>
......@@ -393,6 +407,24 @@
</dependencies>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${git-commit-id-plugin.version}</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
</configuration>
</plugin>
</plugins>
</build>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment