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

Release prepare fails to update version information for ejb-client dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-4
    • 2.0-beta-6
    • None
    • None

    Description

      If you use the dependency management section of a parent pom to include sub-poms of the same project, the release plugin will update the version number for those projects as part of the prepare phase.
      Unfortunately, if you have two dependencies with the same groupId and artifactId (as is the case with generated ejb-clients) prepare will just update one of them.

      I believe the problem in the code is in AbstractRewritePomsPhase.updateDomVersion. The code currently uses an xpath expression matching on groupId and artifactId and then calls xpath.getSingleNode to find the object to update. This will leave out one of the dependencies (either ejb or ejb-client).

      I'm having a little trouble writing a unit test for this (hence no patch upload), but if I could do that, I believe the fix would either be looping over the elements returned from the xpath expression, or altering the xpath expression (and the rest of the artifact handling - read: bigger change) to be more explicit about what artifacts it's looking at (including type, classifier, etc...).

      Attachments

        1. MRELEASE-178-similar-deps_rev_535938.patch
          17 kB
          René Link
        2. MRELEASE-178-similar-deps.patch
          8 kB
          Eric Bernstein

        Activity

          People

            evenisse Emmanuel Venisse
            ebernstein Eric Bernstein
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: