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

Automatically resolve snapshot dependencies in release:prepare

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.1
    • 3.0.0-M4, 3.0.0-M2
    • prepare
    • None
    • Patch

    Description

      mvn release:prepare has a nice feature to automatically resolve snapshot dependencies in a pom.xml when it detects that there are still unresolved ones. Unfortunately this only works in interactive mode, and directly breaks the build in batch mode.

      The attached patch adds the following two command-line parameters to release:prepare so that a user can run release:prepare in fully non-interactive mode, and doesn't change the actual behaviour when they are not given:

      • autoResolveSnapshotDependencies
      • autoResolveSnapshotDependenciesMode

      Background:

      Say I have projects A and B, and B depends on A. Both projects are about to be released at a certain time.

      "mvn release:prepare release:perform" does this job quite well and can be implemented for project A for example on a build server to be run non-interactively via the build server's web interface.

      To release project B in a similar way, i.e. as a non-interactive job on a build server, this requires that I manually update the snapshot dependencies of B's pom.xml and check in the modified file before I trigger the job; otherwise the build would fail.

      Attachments

        1. maven-release-plugin.patch
          15 kB
          Thorsten Scherler

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              thorsten Thorsten Scherler
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m