This is an automated email from the ASF dual-hosted git repository. nkalmar pushed a commit to branch branch-3.6 in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.6 by this push: new a93ff0f ZOOKEEPER-3738: Use mavanagaiata for git commit id a93ff0f is described below commit a93ff0fe631d1c96ee056a79e3c16535ab33c794 Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Mon Mar 2 17:08:47 2020 +0100 ZOOKEEPER-3738: Use mavanagaiata for git commit id Use mavanagaiata plugin to get git commit id for VerGen instead of properties-maven-plugin (which is broken in some environments). Also add the commit to the jar manifests for easy reference when given a jar of unknown origin (especially useful for SNAPSHOT builds). Author: Christopher Tubbs <ctubb...@apache.org> Reviewers: Enrico Olivelli <eolive...@apache.org>, Norbert Kalmar <nkal...@apache.org> Closes #1268 from ctubbsii/ZK-3738 (cherry picked from commit 050e56ae48b978a9f8c04dfe00e1647e4301f5a0) Signed-off-by: Norbert Kalmar <nkal...@apache.org> --- .gitignore | 1 - pom.xml | 47 +++++++++++++++++------------------------------ zookeeper-server/pom.xml | 19 +------------------ 3 files changed, 18 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index cf5ff24..55937ce 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ zookeeper-server/version-2/* # SVN .svn .revision -git.properties # Eclipse .metadata diff --git a/pom.xml b/pom.xml index 7612a0a..cebbec8 100755 --- a/pom.xml +++ b/pom.xml @@ -526,11 +526,6 @@ <pluginManagement> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>properties-maven-plugin</artifactId> - <version>1.0.0</version> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> @@ -551,6 +546,13 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.1.0</version> + <configuration> + <archive> + <manifestEntries> + <Implementation-Build>${mvngit.commit.id}</Implementation-Build> + </manifestEntries> + </archive> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -601,10 +603,12 @@ <version>1.6.0</version> </plugin> <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> - <version>2.2.5</version> - <inherited>false</inherited> + <groupId>com.github.koraktor</groupId> + <artifactId>mavanagaiata</artifactId> + <version>0.9.4</version> + <configuration> + <skipNoGit>true</skipNoGit> + </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> @@ -680,33 +684,17 @@ <plugins> <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> + <groupId>com.github.koraktor</groupId> + <artifactId>mavanagaiata</artifactId> <executions> <execution> <id>find-current-git-revision</id> <goals> - <goal>revision</goal> + <goal>commit</goal> </goals> - <phase>generate-resources</phase> + <phase>validate</phase> </execution> </executions> - <configuration> - <skipPoms>false</skipPoms> - <runOnlyOnce>true</runOnlyOnce> - <failOnNoGitDirectory>false</failOnNoGitDirectory> - <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> - <prefix>git</prefix> - <verbose>false</verbose> - <generateGitPropertiesFile>true</generateGitPropertiesFile> - <generateGitPropertiesFilename>${project.basedir}/zookeeper-server/src/main/resources/git.properties</generateGitPropertiesFilename> - <format>properties</format> - <gitDescribe> - <skip>false</skip> - <always>false</always> - <dirty>-dirty</dirty> - </gitDescribe> - </configuration> </plugin> <plugin> <groupId>org.openclover</groupId> @@ -847,7 +835,6 @@ <excludes> <exclude>**/log4j.properties</exclude> <exclude>**/README.md</exclude> - <exclude>**/git.properties</exclude> <exclude>**/findbugsExcludeFile.xml</exclude> <exclude>**/checkstyle-noframes-sorted.xsl</exclude> <exclude>**/configure.ac</exclude> diff --git a/zookeeper-server/pom.xml b/zookeeper-server/pom.xml index 5fb044a..07822f0 100755 --- a/zookeeper-server/pom.xml +++ b/zookeeper-server/pom.xml @@ -167,23 +167,6 @@ <build> <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>properties-maven-plugin</artifactId> - <executions> - <execution> - <phase>initialize</phase> - <goals> - <goal>read-project-properties</goal> - </goals> - <configuration> - <files> - <file>${basedir}/src/main/resources/git.properties</file> - </files> - </configuration> - </execution> - </executions> - </plugin> <plugin> <!-- ${maven.build.timestamp} does not support timezone :( --> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> @@ -249,7 +232,7 @@ <classpath /> <argument>org.apache.zookeeper.version.util.VerGen</argument> <argument>${project.version}</argument> - <argument>${git.commit.id}</argument> + <argument>${mvngit.commit.id}</argument> <argument>${build.time}</argument> <argument>${project.basedir}/target/generated-sources/java</argument> </arguments>