From 40d242edbc8e31d8e26759e98927d71a11c24649 Mon Sep 17 00:00:00 2001 From: Derek Straka Date: Tue, 29 May 2018 21:33:36 -0400 Subject: [PATCH] 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. Signed-off-by: Derek Straka --- 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 @@ private NarDependency getNarDependency() throws MojoExecutionException { } 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;