You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by kd...@apache.org on 2019/02/13 20:07:02 UTC

[nifi-maven] 15/20: NIFI-4930: Resolve issues when fetching nar files from artifact repositories like artifactory

This is an automated email from the ASF dual-hosted git repository.

kdoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-maven.git

commit 5a74629467d11ddc6ac1ef07c246c4588bfd9bca
Author: Derek Straka <de...@asterius.io>
AuthorDate: Tue May 29 21:33:36 2018 -0400

    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>
---
 src/main/java/org/apache/nifi/NarMojo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;