Skip to content

Commit 3879114

Browse files
author
TheSnoozer
committed
Merge pull request #200 from TheSnoozer/master
Re enable Tests and update Readme to the latest version
2 parents 6ca9bd9 + 90c3998 commit 3879114

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+543
-12
lines changed

.java-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ A detailed description of using the plugin is available in the <a href="https://
3838

3939
Versions
4040
--------
41-
The current version is **2.1.14** ([changelist](https://github.com/ktoso/maven-git-commit-id-plugin/issues?q=milestone%3A2.1.14)).
41+
The current version is **2.1.15** ([changelist](https://github.com/ktoso/maven-git-commit-id-plugin/issues?q=milestone%3A2.1.15)).
4242

4343
You can check the available versions by visiting [search.maven.org](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22pl.project13.maven%22%20AND%20a%3A%22git-commit-id-plugin%22), though using the newest is obviously the best choice.
4444

@@ -101,7 +101,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base
101101
<plugin>
102102
<groupId>pl.project13.maven</groupId>
103103
<artifactId>git-commit-id-plugin</artifactId>
104-
<version>2.1.14</version>
104+
<version>2.1.15</version>
105105
<executions>
106106
<execution>
107107
<goals>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ public enum AvailableGitTestRepo {
6060
WITH_LIGHTWEIGHT_TAG_BEFORE_ANNOTATED_TAG("src/test/resources/_git_lightweight_tag_before_annotated_tag"),
6161
WITH_TAG_ON_DIFFERENT_BRANCH("src/test/resources/_git_with_tag_on_different_branch"),
6262
WITH_ONE_COMMIT_WITH_SPECIAL_CHARACTERS("src/test/resources/_git_one_commit_with_umlaut"),
63+
/**
64+
* <pre>
65+
* b0c6d28b3b83bf7b905321bae67d9ca4c75a203f 2015-06-04 00:50:18 +0200 (HEAD, master)
66+
* 0e3495783c56589213ee5f2ae8900e2dc1b776c4 2015-06-03 23:59:10 +0200 (tag: v2.0)
67+
* f830b5f85cad3d33ba50d04c3d1454e1ae469057 2015-06-03 23:57:53 +0200 (tag: v1.0)
68+
* </pre>
69+
*/
70+
WITH_THREE_COMMITS_AND_TWO_TAGS_CURRENTLY_ON_COMMIT_WITHOUT_TAG("src/test/resources/_git_three_commits_and_two_tags_currently_on_commit_without_tag"),
6371
MAVEN_GIT_COMMIT_ID_PLUGIN(".git");
6472

6573
private String dir;

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* You should have received a copy of the GNU Lesser General Public License
1515
* along with git-commit-id-plugin. If not, see <http://www.gnu.org/licenses/>.
16-
*/
16+
*/
1717

1818
package pl.project13.maven.git;
1919

@@ -624,15 +624,16 @@ public void runGitDescribeWithMatchOption(boolean useNativeGit) throws Exception
624624
// given
625625
mavenSandbox.withParentProject("my-plugin-project", "jar")
626626
.withNoChildProject()
627-
.withGitRepoInParent(AvailableGitTestRepo.MAVEN_GIT_COMMIT_ID_PLUGIN)
627+
.withGitRepoInParent(AvailableGitTestRepo.WITH_THREE_COMMITS_AND_TWO_TAGS_CURRENTLY_ON_COMMIT_WITHOUT_TAG)
628628
.create(CleanUp.CLEANUP_FIRST);
629629
MavenProject targetProject = mavenSandbox.getParentProject();
630630

631631
setProjectToExecuteMojoIn(targetProject);
632632

633+
String headCommitId = "b0c6d28b3b83bf7b905321bae67d9ca4c75a203f";
633634
Map<String,String> gitTagMap = new HashMap<String,String>();
634-
gitTagMap.put("v2.1.11", "56c5a491720ce35ae8f8626be1d3414728f1b953");
635-
gitTagMap.put("v2.1.12", "e9879658209ee81d7bf50ceedd028737f0b1cd0c");
635+
gitTagMap.put("v1.0", "f830b5f85cad3d33ba50d04c3d1454e1ae469057");
636+
gitTagMap.put("v2.0", "0e3495783c56589213ee5f2ae8900e2dc1b776c4");
636637

637638
for (Map.Entry<String,String> entry : gitTagMap.entrySet()) {
638639
String gitDescribeMatchNeedle = entry.getKey();
@@ -654,6 +655,7 @@ public void runGitDescribeWithMatchOption(boolean useNativeGit) throws Exception
654655

655656
assertThat(targetProject.getProperties().stringPropertyNames()).contains("git.commit.id");
656657
assertThat(targetProject.getProperties().get("git.commit.id")).isNotEqualTo(commitIdOfMatchNeedle);
658+
assertThat(targetProject.getProperties().get("git.commit.id")).isEqualTo(headCommitId);
657659
}
658660
}
659661

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import org.apache.maven.project.MavenProject;
2929
import org.junit.Assert;
30-
import org.junit.Ignore;
3130
import org.junit.Test;
3231

3332
import pl.project13.maven.git.FileSystemMavenSandbox.CleanUp;
@@ -55,7 +54,6 @@ public class NativeAndJGitProviderTest extends GitIntegrationTest
5554
public static final String ISO8601_FORMAT_STRING = "yyyy-MM-dd'T'HH:mm:ssZZ";
5655

5756
@Test
58-
@Ignore
5957
public void testCompareBasic() throws Exception
6058
{
6159
// Test on all available basic repos to ensure that the output is identical.
@@ -67,7 +65,6 @@ public void testCompareBasic() throws Exception
6765
}
6866

6967
@Test
70-
@Ignore
7168
public void testCompareSubrepoInRoot() throws Exception
7269
{
7370
for (AvailableGitTestRepo testRepo : AvailableGitTestRepo.values()) {
@@ -81,7 +78,6 @@ public void testCompareSubrepoInRoot() throws Exception
8178
}
8279

8380
@Test
84-
@Ignore
8581
public void testCompareSubrepoInChild() throws Exception
8682
{
8783
for (AvailableGitTestRepo testRepo : AvailableGitTestRepo.values()) {
@@ -95,7 +91,6 @@ public void testCompareSubrepoInChild() throws Exception
9591
}
9692

9793
@Test
98-
@Ignore
9994
public void testCompareISO8601Time() throws Exception
10095
{
10196
// Test on all available basic repos to ensure that the output is identical.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Third line
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref: refs/heads/master
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[core]
2+
repositoryformatversion = 0
3+
filemode = true
4+
bare = false
5+
logallrefupdates = true
6+
[user]
7+
name = S L
8+
email = s.lange@mailbox.tu-berlin.de
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Unnamed repository; edit this file 'description' to name the repository.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
#
3+
# An example hook script to check the commit log message taken by
4+
# applypatch from an e-mail message.
5+
#
6+
# The hook should exit with non-zero status after issuing an
7+
# appropriate message if it wants to stop the commit. The hook is
8+
# allowed to edit the commit message file.
9+
#
10+
# To enable this hook, rename this file to "applypatch-msg".
11+
12+
. git-sh-setup
13+
test -x "$GIT_DIR/hooks/commit-msg" &&
14+
exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
15+
:

0 commit comments

Comments
 (0)