Skip to content

Commit 4555113

Browse files
author
TheSnoozer
committed
#701: adopt to the new git-commit-id-plugin-core
1 parent 0d17e06 commit 4555113

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>${project.groupId}</groupId>
6565
<artifactId>git-commit-id-plugin-core</artifactId>
66-
<version>6.0.0-rc.6</version>
66+
<version>6.1.0-SNAPSHOT</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.google.code.findbugs</groupId>

src/main/java/pl/project13/maven/git/GitCommitIdMojo.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,11 @@ public Charset getPropertiesSourceCharset() {
13971397
public boolean shouldPropertiesEscapeUnicode() {
13981398
return generateGitPropertiesFileWithEscapedUnicode;
13991399
}
1400+
1401+
@Override
1402+
public boolean shouldFailOnNoGitDirectory() {
1403+
return failOnNoGitDirectory;
1404+
}
14001405
};
14011406

14021407
GitCommitIdPlugin.runPlugin(cb, properties);

src/test/java/pl/project13/maven/git/GitCommitIdMojoIntegrationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ public void shouldSkipWithoutFailOnNoGitDirectoryWhenNoGitRepoFound(boolean useN
585585
mojo.execute();
586586

587587
// then
588-
assertThat(targetProject.getProperties()).isEmpty();
588+
assertThat(targetProject.getProperties().keySet()).containsOnly(
589+
"git.build.time", "git.build.version", "git.build.host");
589590
}
590591

591592
@Test

0 commit comments

Comments
 (0)