Skip to content

Commit

Permalink
Merge pull request #795 from uhafner/git-commit-id
Browse files Browse the repository at this point in the history
Add Maven Git commit ID plugin
  • Loading branch information
uhafner authored Mar 30, 2024
2 parents e4f43b9 + 59e5f8c commit 84d1ceb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
<depgraph-maven-plugin.version>4.0.3</depgraph-maven-plugin.version>
<sortpom-maven-plugin.version>3.4.1</sortpom-maven-plugin.version>
<git-commit-id-maven-plugin.version>8.0.2</git-commit-id-maven-plugin.version>

<!-- OpenRewrite versions -->
<rewrite-maven-plugin.version>5.27.0</rewrite-maven-plugin.version>
Expand Down Expand Up @@ -473,6 +474,29 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>${git-commit-id-maven-plugin.version}</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<includeOnlyProperties>
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
</includeOnlyProperties>
<commitIdGenerationMode>full</commitIdGenerationMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down

0 comments on commit 84d1ceb

Please sign in to comment.