This artifact has been retired! New location is: io.github.git-commit-id:git-commit-id-maven-plugin

logo Git Commit Id Maven Plugin

This plugin makes basic repository information available through maven resources. This can be used to display "what version is this?" or "who has deployed this and when, from which branch?" information at runtime, making it easy to find things like "oh, that isn't deployed yet, I'll test it tomorrow" and making both testers and developers life easier. See https://github.com/git-commit-id/git-commit-id-maven-plugin

homepage:
fresh index:
last release: 6 months ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
git-commit-id:revision (phase: initialize)

Puts git build-time information into property files or maven's properties.

git-commit-id:validateRevision (phase: verify)

Often used code snippets:

<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>
    <failOnNoGitDirectory>false</failOnNoGitDirectory>
  </configuration>
</plugin>
<plugin>
  <groupId>pl.project13.maven</groupId>
  <artifactId>git-commit-id-plugin</artifactId>
  <configuration>
    <verbose>false</verbose>
  </configuration>
</plugin>
<plugin>
  <groupId>pl.project13.maven</groupId>
  <artifactId>git-commit-id-plugin</artifactId>
  <configuration>
    <failOnNoGitDirectory>false</failOnNoGitDirectory>
  </configuration>
</plugin>
<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>
  <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>
    <failOnNoGitDirectory>false</failOnNoGitDirectory>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.