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

release:prepare does not update properties during rewrite-poms-for-development phase.

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0-beta-8
    • 2.2.2
    • prepare
    • Maven version: 2.0.10-RC8
      Java version: 1.5.0_14
      OS name: "linux" version: "2.6.28.4" arch: "i386" Family: "unix"
    • Patch

    Description

      When a dependency version is specified using a property like ${someExpression} that property is correctly updated during the rewrite-poms-for-release phase but not during the rewrite-poms-for-development phase. The attached patch solves this for me.

      Attachments

        Issue Links

          Activity

            Patch for updating properties during the rewrite-poms-for-development phase.

            schulte77 Christian Schulte added a comment - Patch for updating properties during the rewrite-poms-for-development phase.

            We only observed this issue while importing a dependency management (what can be fixed with the supplied MRELEASE-454 patch)

            There is already a success unit test for the case where the property is associated to a regular dependency:

            1) pom-with-parent-and-properties

            In the MRELEASE-454 patch we added two additional unit tests:

            2) pom-with-parent-and-properties-in-dependency-management
            3) pom-with-parent-and-properties-in-dependency-management-import

            Without the MRELEASE-454 patch, 1) and 2) pass but the 3) fail.

            prodriguez Pedro Rodriguez added a comment - We only observed this issue while importing a dependency management (what can be fixed with the supplied MRELEASE-454 patch) There is already a success unit test for the case where the property is associated to a regular dependency: 1) pom-with-parent-and-properties In the MRELEASE-454 patch we added two additional unit tests: 2) pom-with-parent-and-properties-in-dependency-management 3) pom-with-parent-and-properties-in-dependency-management-import Without the MRELEASE-454 patch, 1) and 2) pass but the 3) fail.

            The unit tests couldn’t show it because the problem occurs at the integration level of the release phases.

            The rewrite-poms-for-release phase changed the property only in the xml.

            During the rewrite-poms-for-development, the new xml (with the "release" version value) get parsed. However, the same unchanged reactor project (with the previous “development” property value) is used.

            The development version is not set during the rewrite-poms-for-development phase because the value of the property in the xml is not the same that in the project model.

            Fix: The project model needs to be updated when we change a property value.

            We have fixed this issue at the same time that the MRELEASE-454

            prodriguez Pedro Rodriguez added a comment - The unit tests couldn’t show it because the problem occurs at the integration level of the release phases. The rewrite-poms-for-release phase changed the property only in the xml. During the rewrite-poms-for-development, the new xml (with the "release" version value) get parsed. However, the same unchanged reactor project (with the previous “development” property value) is used. The development version is not set during the rewrite-poms-for-development phase because the value of the property in the xml is not the same that in the project model. Fix: The project model needs to be updated when we change a property value. We have fixed this issue at the same time that the MRELEASE-454

            This looks like it could be applied for 2.3

            stephenc Stephen Connolly added a comment - This looks like it could be applied for 2.3

            Version 2.2.2 fixed this as well.

            schulte77 Christian Schulte added a comment - Version 2.2.2 fixed this as well.

            People

              Unassigned Unassigned
              schulte77 Christian Schulte
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: