Skip to content

Commit

Permalink
git-commit-id-plugin does not throw exception in case of absent .git …
Browse files Browse the repository at this point in the history
…folder

if git_commit-id-plugin can not get git info parameters then gmaven-plugin creates these parameters with default value ("*")
(#1733)
  • Loading branch information
ssuvorov-fls committed Jan 25, 2021
1 parent a885879 commit 8425675
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,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 @@ -317,6 +318,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 Expand Up @@ -478,6 +499,22 @@
</dependencies>
</dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.maven/maven-core -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.3.9</version>
</dependency>
<dependency>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down

0 comments on commit 8425675

Please sign in to comment.