Skip to content

Commit

Permalink
Issue 1733 build error without git dir (#1757)
Browse files Browse the repository at this point in the history
* git-commit-id-plugin does not throw exception in case of absent .git folder
if git_commit-id-plugin can not get git info parameters then gmaven-plugin creates these parameters with default value ("*")
(#1733)

* removed temporary dependencies
(#1733)

Co-authored-by: Sergey Suvorov <[email protected]>
  • Loading branch information
2 people authored and chrisknoll committed Feb 5, 2021
1 parent 28e6dd5 commit d5cf963
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
</executions>
<configuration>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<!-- only include properties to speed up plugin -->
<!-- ref: https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/462 -->
<includeOnlyProperties>
Expand All @@ -311,6 +312,26 @@
</includeOnlyProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-git-branch-info</id>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
if (project.properties.getProperty("git.branch") == null) project.properties.setProperty("git.branch", "*");
if (project.properties.getProperty("git.commit.id.abbrev") == null) project.properties.setProperty("git.commit.id.abbrev", "*");
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down

0 comments on commit d5cf963

Please sign in to comment.