Puzzling issue with dependency updates in release-finish

395 views
Skip to first unread message

Rob Moore

unread,
Jul 15, 2015, 4:57:33 PM7/15/15
to maven-jgit...@googlegroups.com
I have a cross-project dependency that doesn't seem to be resolved properly as I end up getting an error about snapshot dependencies (Cannot finish a release due to snapshot dependencies) when I run release-finish.

The projects both have the same snapshot version and updateDependencies is set to the default value (true). The project that provides the dependency was released just prior to this project using jgitflow and I have both the release and snapshot artifacts in my local repo.

Looking at the debug output and the .git/jgitflow.log and haven't come across any entries that provide any insight. I'd appreciate any assistance as I'm stumped.

Cheers,

Rob

Jeffrey Bell

unread,
Jul 15, 2015, 8:44:27 PM7/15/15
to maven-jgit...@googlegroups.com
I've seen this before, when you have a dependency in the dependencyManagement section that is a snapshot.

Rob Moore

unread,
Jul 16, 2015, 11:10:29 AM7/16/15
to Jeffrey Bell, maven-jgit...@googlegroups.com
Thanks for the response, Jeffrey. The dependency is a snapshot in the release branch but is of the same version as the branch itself and needs to be updated at the same time. For example, the project with the dependency is 1.0-SNAPSHOT and the dependency is 1.0-SNAPSHOT. The dependency is declared in the project rather than in a super POM or the like. My understanding is that if updateDependencies is enabled then the dependency will be changed to 1.0 just like the project version itself. I might be mistaken but I believe this worked correctly before so I was surprised to see it fail but it does so consistently.

--
You received this message because you are subscribed to the Google Groups "Maven JGit Flow Plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jgitflow-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeffrey Bell

unread,
Jul 18, 2015, 2:49:08 PM7/18/15
to maven-jgit...@googlegroups.com
I'm not really following what exactly is going on. Are you expecting the plugin to update a SNAPSHOT dependency released from another repository when calling finish-release on the current one? If not, anyway you can provide some more details?

In my case, I noticed a difference in how the jgitflow-maven-plugin works versus the maven-release-plugin when dealing with SNAPSHOT versions of a child module in the dependencyManagement section that are never actually used in the project. This ended up happening due to the removal of the child module from the repository, but never going back and removing it from the dependencyManagement section in the parent pom.

Rob Moore

unread,
Jul 20, 2015, 11:11:46 AM7/20/15
to Jeffrey Bell, maven-jgit...@googlegroups.com
Sorry I wasn't clear. The SNAPSHOT dependency is from the same Maven repo (and has the same group ID) but a different git repo. I'll double check but I feel confident that the dependency is being used by the project that declares the dependency. The projects share a super POM in common but have different parent POMs (so the project hierarchies are A -> B -> C vs. A -> D -> E where each letter represents an unique POM).

On Sat, Jul 18, 2015 at 1:49 PM Jeffrey Bell <jeff....@gmail.com> wrote:
I'm not really following what exactly is going on. Are you expecting the plugin to update a SNAPSHOT dependency released from another repository when calling finish-release on the current one? If not, anyway you can provide some more details?

In my case, I noticed a difference in how the jgitflow-maven-plugin works versus the maven-release-plugin when dealing with SNAPSHOT versions of a child module in the dependencyManagement section that are never actually used in the project. This ended up happening due to the removal of the child module from the repository, but never going back and removing it from the dependencyManagement section in the parent pom.

Jeffrey Bell

unread,
Jul 20, 2015, 8:24:50 PM7/20/15
to maven-jgit...@googlegroups.com
The plugin will not update a SNAPSHOT dependency to the latest released version when that dependency is not a part of that Maven build. You will either need to update the version of the SNAPSHOT manually to the released version or add -DallowSnapshots=true to allow the SNAPSHOT version in the release.

Rob Moore

unread,
Aug 14, 2015, 8:45:39 AM8/14/15
to Jeffrey Bell, maven-jgit...@googlegroups.com
Thanks, Jeffrey. I ended up just using ${project.version} instead based on a tip elsewhere.

On Mon, Jul 20, 2015 at 7:24 PM Jeffrey Bell <jeff....@gmail.com> wrote:
The plugin will not update a SNAPSHOT dependency to the latest released version when that dependency is not a part of that Maven build. You will either need to update the version of the SNAPSHOT manually to the released version or add -DallowSnapshots=true to allow the SNAPSHOT version in the release.

--
You received this message because you are subscribed to a topic in the Google Groups "Maven JGit Flow Plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maven-jgitflow-users/upWpbFAFpbU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maven-jgitflow-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages