[
https://issues.apache.org/jira/browse/NIFI-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryan Bende reassigned NIFI-4930:
---------------------------------
Assignee: Bryan Bende (was: Bryan Bende)
> Nar-Dependency-Version - timestamped snapshot version problem
> -------------------------------------------------------------
>
> Key: NIFI-4930
> URL: https://issues.apache.org/jira/browse/NIFI-4930
> Project: Apache NiFi
> Issue Type: Bug
> Components: Tools and Build
> Affects Versions: 1.2.0
> Reporter: Arne Degenring
> Assignee: Bryan Bende
> Priority: Major
> Labels: Nar-Maven-Plugin
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> 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.
> Suggested Fix in NarMojo.java: use artifact.getBaseVersion() instead of
> artifact.getVersion():
> Replace line 705:
> narDependency = new NarDependency(artifact.getGroupId(),
> artifact.getArtifactId(), artifact.getVersion());
> with:
> narDependency = new NarDependency(artifact.getGroupId(),
> artifact.getArtifactId(), artifact.getBaseVersion());
>
> --
> Long explanation, from
> [https://lists.apache.org/thread.html/ce44faa7b1a54aac417fca06200712de629c3bc2ed692813c0a10a73@%3Cusers.nifi.apache.org%3E]
> We have seen a strange problem on NiFi 1.4.0 where custom processors could
> suddenly not be started, because of incompatibility with custom services:
> 2018-03-02 13:40:35,490 ERROR [main] o.apache.nifi.controller.FlowController
> Unable to start ...[id=5d57d39a-015c-1000-ffff-ffffd654d90b] due to
> java.lang.IllegalStateException: Processor ... is not in a valid state due to
> ... is invalid because ... - 1.4-SNAPSHOT from ... is not compatible with
> ... - 1.4-SNAPSHOT ...]
> It seems that the root cause was related to:
> 2018-03-02 13:39:55,086 WARN [main] org.apache.nifi.nar.NarClassLoaders While
> loading ...:...:1.5-SNAPSHOT' unable to locate exact NAR dependency
> '...:...:1.4-20180302.111133-16'. Only found one possible match
> ...:....:1.4-SNAPSHOT'. Continuing...
> It turned out that our various custom NARs were built on different built
> agents.
> Maven has the (ugly) behaviour that when a snapshot version is present in the
> local repository after local build, the version number will be e.g.
> 1.4-SNAPSHOT. However if it is downloaded from a remote repository, the
> version number includes a timestamp such as 1.4-20180302.111133-16.
> So the manifest of the depending NARs contained:
> Nar-Dependency-Version: 1.4-20180302.111133-16
> while the other NAR file declared:
> Nar-Version: 1.4-SNAPSHOT
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)