You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2018/07/17 18:27:44 UTC

nifi-maven git commit: NIFI-4930: Resolve issues when fetching nar files from artifact repositories like artifactory

Repository: nifi-maven
Updated Branches:
  refs/heads/master fc124e591 -> 5a7462946


NIFI-4930: Resolve issues when fetching nar files from artifact repositories like artifactory

The NAR Maven Plugin 1.2.0 is using artifact.getVersion() to determine the Nar-Dependency-Version, however this version number can be a timestamped snapshot version number if the dependency was downloaded from a remote repo. The Nar-Dependency-Version can then differ from the declared Nar-Version in the other JAR.

This closes #3.

Signed-off-by: Derek Straka <de...@asterius.io>
Signed-off-by: Bryan Bende <bb...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-maven/commit/5a746294
Tree: http://git-wip-us.apache.org/repos/asf/nifi-maven/tree/5a746294
Diff: http://git-wip-us.apache.org/repos/asf/nifi-maven/diff/5a746294

Branch: refs/heads/master
Commit: 5a74629467d11ddc6ac1ef07c246c4588bfd9bca
Parents: fc124e5
Author: Derek Straka <de...@asterius.io>
Authored: Tue May 29 21:33:36 2018 -0400
Committer: Bryan Bende <bb...@apache.org>
Committed: Tue Jul 17 14:27:25 2018 -0400

----------------------------------------------------------------------
 src/main/java/org/apache/nifi/NarMojo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-maven/blob/5a746294/src/main/java/org/apache/nifi/NarMojo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/nifi/NarMojo.java b/src/main/java/org/apache/nifi/NarMojo.java
index 809eff4..124a978 100644
--- a/src/main/java/org/apache/nifi/NarMojo.java
+++ b/src/main/java/org/apache/nifi/NarMojo.java
@@ -702,7 +702,7 @@ public class NarMojo extends AbstractMojo {
         } else if (artifacts.size() == 1) {
             final Artifact artifact = (Artifact) artifacts.iterator().next();
 
-            narDependency = new NarDependency(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
+            narDependency = new NarDependency(artifact.getGroupId(), artifact.getArtifactId(), artifact.getBaseVersion());
         }
 
         return narDependency;