Skip to content

Commit 9a6eabe

Browse files
author
TheSnoozer
authored
Merge pull request #342 from TheSnoozer/master
fix #341 (NullPointerException at pl.project13.jgit.dummy.DatedRevTag) and adding readme section about mvn install/deploy
2 parents a68346d + f6b8cf3 commit 9a6eabe

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,12 @@ Example:
957957
If you are using the maven build with [Maven's Plugin Prefix Resolution](https://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html) (e.g. `mvn somePrefix:goal`) please note that this currently seems to be [not supported by maven](https://issues.apache.org/jira/browse/MNG-6260).
958958
Instead of using the Plugin Prefix Resolution add an execution tag that calls the desired goal of the plugin within a normal maven life cycle (e.g. `mvn clean package`).
959959

960+
Generated properties are not being used in install and/or deploy
961+
-------------------------------
962+
If you try to use generated properties like ${git.commit.id} alongside with your artificat finalName you will soon notice that those properties are not being used in install and/or deploy. This specific behaviour is basically not intended / not supported by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems always $artifactId-$version-$classifier *by default* and thus any generated property will not end up inside the artifact being installed/deployed. If you for whatever reason still want to have something special you may want to [checkout a full workaround](https://github.com/ktoso/maven-git-commit-id-plugin/issues/256#issuecomment-321476196) that uses a specific configuration of `install-file` / `deploy-file`.
963+
964+
As a general note also ensure to use `mvn clean deploy` instead of `mvn deploy:deploy` (or you run into https://issues.apache.org/jira/browse/MNG-6260) and ensure to set `<injectAllReactorProjects>true</injectAllReactorProjects>` inside the plugin's config.
965+
960966
How to contribute to the project
961967
-------------------------------
962968
In general pull requests and support for open issues is always welcome!

src/main/java/pl/project13/jgit/dummy/DatedRevTag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class DatedRevTag {
2929
public final DateTime date;
3030

3131
public DatedRevTag(RevTag tag) {
32-
this(tag.getId(), tag.getTagName(), new DateTime(tag.getTaggerIdent().getWhen()));
32+
this(tag.getId(), tag.getTagName(), (tag.getTaggerIdent() != null) ? new DateTime(tag.getTaggerIdent().getWhen()) : DateTime.now().minusYears(1900));
3333
}
3434

3535
public DatedRevTag(AnyObjectId id, String tagName) {

0 commit comments

Comments
 (0)