diff --git a/README.md b/README.md index 3e1f81e5..52a8fac2 100644 --- a/README.md +++ b/README.md @@ -957,6 +957,12 @@ Example: 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). 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`). +Generated properties are not being used in install and/or deploy +------------------------------- +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`. + +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 `true` inside the plugin's config. + How to contribute to the project ------------------------------- In general pull requests and support for open issues is always welcome! diff --git a/src/main/java/pl/project13/jgit/dummy/DatedRevTag.java b/src/main/java/pl/project13/jgit/dummy/DatedRevTag.java index 9f532b84..8d25173e 100644 --- a/src/main/java/pl/project13/jgit/dummy/DatedRevTag.java +++ b/src/main/java/pl/project13/jgit/dummy/DatedRevTag.java @@ -29,7 +29,7 @@ public class DatedRevTag { public final DateTime date; public DatedRevTag(RevTag tag) { - this(tag.getId(), tag.getTagName(), new DateTime(tag.getTaggerIdent().getWhen())); + this(tag.getId(), tag.getTagName(), (tag.getTaggerIdent() != null) ? new DateTime(tag.getTaggerIdent().getWhen()) : DateTime.now().minusYears(1900)); } public DatedRevTag(AnyObjectId id, String tagName) {