Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-91

Updating of dependencyManagement inconsistent with updating of dependencies with regard to SNAPSHOTs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-4
    • 2.0-beta-5
    • None
    • None
    • maven 2.0.4, win XP

    Description

      The mechanism in release:prepare for creating the new development version of POM's handles snapshots that are part of the current reactor build differently for dependencyManagement and for dependencies.

      A snapshot version in a dependencies section will be updated to the next development version whereas one in dependencyManagement won't.

      The attached patch will change this behavior. It will update a snapshot version under dependencyManagement if and only if it is part of the current reactor build.

      Note that dependencies cannot contain snapshot versions that are not part of the current reactor, but dependencyManagement can. I suggest to forbid this too.

      A second suggestion is to introduce a parameter to control the updating of snapshot dependencies in both dependencyManagement and dependencies sections. Either leave them at the released version or update them to the new development version. This touches on the discussion in MRELEASE-36 about the developer having to knowingly choose to use a new development version. I would be fine with using a parameter to select the behavior as obtained with my patch. My central point is that dependencyManagement and dependencies snapshots should behave the same.

      Attachments

        1. snapshots-reactor-in-dependency-management.tar
          20 kB
          Olivier Lamy
        2. snapshots-reactor-in-dependencies.tar
          20 kB
          Olivier Lamy
        3. rewriting-dev-phase.apt
          5 kB
          Olivier Lamy
        4. release.patch
          3 kB
          Marcel Schutte
        5. MRELEASE-91.patch-2
          1 kB
          Olivier Lamy
        6. MRELEASE-91.patch
          34 kB
          Olivier Lamy
        7. depmgnt.zip
          3 kB
          Marcel Schutte
        8. changes.xml
          0.3 kB
          Olivier Lamy

        Issue Links

          Activity

            People

              evenisse Emmanuel Venisse
              mschutte Marcel Schutte
              Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: