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

Support tagging nested projects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 2.0-beta-6
    • None
    • scm
    • None

    Description

      We have a non-standard situation here. I can almost get Maven to support it, but I can't cross the last hurdle of tagging and releasing the project. The business case is that we have a core product that is built with Maven and a customer implementation of that product that is also built with Maven. Each builds just fine on their own. They are both first-class projects. The second project depends on the first. Each project has multiple modules.

      The situation we want to support is parallel development of both projects. If a developer makes a change in the Core product, we don't want to have to go through a tag/release cycle in order to pull that change into the Customer project. (Yes, this is non-standard and not the best idea, but we have few options due to time and resources.) To accomplish this, we linked the second project into the first using svn:externals. We then created a new profile in our pom.xml that pulls in the "parent" pom.xml from the second project as a module. Let me see if I can visually represent it:

      Core Product

      • Core Product Module 1
      • Core Product Module 2
      • Core Product Module 3
      • Customer Project <== linked via svn:externals and included as a module in the "Core Product" pom.xml via a profile
      • Customer Project Module 1
      • Customer Project Module 2
      • Customer Project Module 3

      Note that the version numbers for the Customer projects are different than those in the Core Product.

      This works like a champ when running most plug-ins against it. For example, I can run the eclipse plug-in against it (using the special profile), and all project dependencies are resolved correctly between the two. The problem comes when I try to tag and release them together. This is the command I'm using:

      mvn -P customer --batch-mode -Darguments="-P customer" -DpreparationGoals="jar:test-jar install" -Dresume=false -Dgoals="deploy site-deploy" clean install release:prepare release:perform release:clean
      

      The "customer" profile is the one that pulls in the customer projects. This command (executed in Continuum) works like a champ to release our other projects. But when I run it against this project, here's what happens:

      1. Updates versions on all projects (both Core and Customer) to drop SNAPSHOT
      2. Installs all projects
      3. Tags Core project
        • Does not tag Customer project (this is the problem)
        • Tagged Core project still points to external projects' trunk (this is a SVN issue, not a Maven issue)
      4. Updates versions on all projects (both Core and Customer) to next SNAPSHOT
      5. Checks out tagged project
        • Project still points to Customer project's trunk (again, a SVN issue)
      6. Builds projects
        • Build fails on external projects because they point to the new SNAPSHOT version of main project (due to SVN issue)

      So ignoring the SVN issues, here's what I'd like to see supported by the release plug-in:

      • When tagging, also tag the Customer project that is included via a module. It is a stand-alone project, so it has all of the necessary information in the pom.

      I know this is a bit convoluted, so please let me know if you need clarification. I could potentially attach some of our pom files to show how our project is set up, but a big part of this is the directory structure (which we create using svn:externals, but it doesn't have to be done that way), so I'm not sure how useful it would be.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              arabull Michael Johns
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: