Menu

#36 Don't use version ranges for dependencies

0.9.15
closed-fixed
None
5
2014-11-05
2014-09-10
Dave
No

It's well known that version ranges don't work in Maven so should not be used. We just had a case where the dependency on freemarker was failing because it was resolving to 2.3.21-SNAPSHOT so the project could not be release and then it was failing because that snapshot was deleted because they upgraded to a release candidate. Since version ranges are known to know work correctly they should not be used, fixed versions should be used instead and users can override with dependencyManagement if needed.

Discussion

  • Dániel Dékány

    Thanks for pointing this out, because the problem not only affects FMPP users but all FreeMarker users who have used version ranges. I haven't realized that it's not backward compatible to create a public snapshot repo... because, whoever used a version range on FreeMarker now starts to pick up snapshot versions instead of stables, which isn't funny. It's especially not fun as Sonetype deletes "old" (few days old) snapshots yet somehow Maven still wants to picking up 2.3.21-SNAPSHOT and then it fails.

    For these reasons I have just deleted the snapshot repo of FreeMarker.

    Regardless, I also change that dependency to 2.3.21 with the next FMPP release.

     
  • Dániel Dékány

    • status: open --> accepted
    • assigned_to: Dániel Dékány
     
  • Dániel Dékány

    (BTW, apparently, Sonetype keeps the last SNAPSHOT version forever, except in this case it got confused because accidentally there was a Maven 2 SNAPSHOT there too...)

     
  • Dániel Dékány

    • Group: unassinged --> 0.9.15
     
  • Dániel Dékány

    • status: accepted --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB