Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-261

release:prepare should support flat directory multi-module projects

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: prepare
    • Labels:
      None
    • Environment:
      linux / maven2 / svn
    • Patch Submitted:
      Yes
    • Number of attachments :
      10

      Description

      What I mean by flat file structure firstly.

      parent/pom.xml
      module1/pom.xml
      module2/pom.xml
      .
      .
      .
      module15/pom.xml

      the parent references the modules like so

      <modules>
      <module>../module1</module>
      <module>../module2</module>
      .
      .
      .
      <module>../module15</module>
      </modules>

      When i release:prepare only the parent project is tagged the modules projects versions are incremented etc but the modules are not tagged in svn.

      I use this structure as i use eclipse as my IDE.

      I would love to see a fix for the issue marked as closed here http://jira.codehaus.org/browse/MRELEASE-138. I am currenrly tagging by hand each submodule of the projects but it would be so nice to have the release plugin do this for me.

      forgive my english.

      1. flatProject.main.patch
        11 kB
        Moritz Rebbert
      2. flatProject.test.patch
        9 kB
        Moritz Rebbert
      3. maven-release-issue.tar.gz
        2 kB
        Eric Miles
      4. MRELEASE-261.patch
        12 kB
        Maria Odea Ching
      5. MRELEASE-261-with-its.patch
        32 kB
        Maria Odea Ching
      6. MRELEASE-261-with-its-v3.patch
        77 kB
        Maria Odea Ching
      7. PrepareReleaseMojo.patch
        1 kB
        Adam Leggett
      1. odd-tags.png
        24 kB

        Issue Links

          Activity

          Hide
          Mike R. Haller added a comment -

          I'd like to share my use case with you to understand why people may have 'unusual' project structures.
          I think that my problem is the same as the one in this issue, but not sure.
          So, my apologizes if this does not fit 100% and should be posted to MRELEASE-516

          We started with the following set up:

          ModuleA/trunk/pom.xml
          ModuleB/trunk/pom.xml
          ModuleC/trunk/pom.xml
          

          These were more or less independent artifacts and the release process was just releasing those three artifacts individually.
          Every module's pom.xml has its own <scm> element.
          After a while, additional modules were implemented and a common parent pom was introduced, hence the structure became:

          Parent/trunk/pom.xml
          ModuleA/trunk/pom.xml
          ModuleB/trunk/pom.xml
          ...
          ModuleY/trunk/pom.xml
          ModuleZ/trunk/pom.xml
          

          Now, the release process for many modules takes up a lot of time and the idea is to aggregate all the releases into
          a single release step from a release manager point of view. So, a reactor build is put on top of the whole thing:

          Everything/trunk/pom.xml (Modules: ModuleA, ModuleB ... ModuleZ)
          ModuleA/trunk/pom.xml
          ModuleB/trunk/pom.xml
          ...
          ModuleY/trunk/pom.xml
          ModuleZ/trunk/pom.xml
          

          The Everything-pom.xml contains the modules:

          <modules>
          	<module>ModuleA</module>
          	<module>ModuleB</module>
          	<module>...</module>
          	<module>ModuleY</module>
          	<module>ModuleZ</module>
          </modules>
          

          Then, all the trunks are checked out from SCM (SVN, using the svn:externals property) into the local working copy, so they reflect the correct
          structure without any 'trunk' folders or relative paths like "../ModuleA".

          pom.xml (from Everything/trunk/pom.xml)
          + ModuleA/pom.xml
          + ModuleB/pom.xml
          ...
          + ModuleY/pom.xml
          + ModuleZ/pom.xml
          

          Now, i'm trying to perform a release in the root of this folder, e.g. the "Everything" project.
          The reactor will prepare all modules, but unfortunately, the SVN tag of each module is overwritten and becomes incorrect.
          Each module should be committed to its own 'tags/' folder with name and version of the module.
          However, what actually happens is, the release plugin replaces all SCM URLS of each module with the name of the Everything-pom.xml:

          Actually in pom.xml.tag: <url>scm:svn:.../ModuleA/tags/Everything-1.0/ModuleA/trunk</url>
          Expected in pom.xml.tag: <url>scm:svn:.../ModuleA/tags/ModuleA-1.0</url>

          Show
          Mike R. Haller added a comment - I'd like to share my use case with you to understand why people may have 'unusual' project structures. I think that my problem is the same as the one in this issue, but not sure. So, my apologizes if this does not fit 100% and should be posted to MRELEASE-516 We started with the following set up: ModuleA/trunk/pom.xml ModuleB/trunk/pom.xml ModuleC/trunk/pom.xml These were more or less independent artifacts and the release process was just releasing those three artifacts individually. Every module's pom.xml has its own <scm> element. After a while, additional modules were implemented and a common parent pom was introduced, hence the structure became: Parent/trunk/pom.xml ModuleA/trunk/pom.xml ModuleB/trunk/pom.xml ... ModuleY/trunk/pom.xml ModuleZ/trunk/pom.xml Now, the release process for many modules takes up a lot of time and the idea is to aggregate all the releases into a single release step from a release manager point of view. So, a reactor build is put on top of the whole thing: Everything/trunk/pom.xml (Modules: ModuleA, ModuleB ... ModuleZ) ModuleA/trunk/pom.xml ModuleB/trunk/pom.xml ... ModuleY/trunk/pom.xml ModuleZ/trunk/pom.xml The Everything-pom.xml contains the modules: <modules> <module>ModuleA</module> <module>ModuleB</module> <module>...</module> <module>ModuleY</module> <module>ModuleZ</module> </modules> Then, all the trunks are checked out from SCM (SVN, using the svn:externals property) into the local working copy, so they reflect the correct structure without any 'trunk' folders or relative paths like "../ModuleA". pom.xml (from Everything/trunk/pom.xml) + ModuleA/pom.xml + ModuleB/pom.xml ... + ModuleY/pom.xml + ModuleZ/pom.xml Now, i'm trying to perform a release in the root of this folder, e.g. the "Everything" project. The reactor will prepare all modules, but unfortunately, the SVN tag of each module is overwritten and becomes incorrect. Each module should be committed to its own 'tags/' folder with name and version of the module. However, what actually happens is, the release plugin replaces all SCM URLS of each module with the name of the Everything-pom.xml: Actually in pom.xml.tag: <url>scm:svn:.../ModuleA/tags/Everything-1.0/ModuleA/trunk</url> Expected in pom.xml.tag: <url>scm:svn:.../ModuleA/tags/ModuleA-1.0</url>
          Hide
          Hannes Kogler added a comment - - edited

          @Mike R. Haller
          I'm using CVS so I have the problem that the release plugin doesn't work for flat project structures correctly.
          But the other problem you describe about the entry of the reactor/Everything project to the poms of the child projects I also can reconstruct with the <tag> element in the <scm> section..

          this is NOT FIXED at all!

          Show
          Hannes Kogler added a comment - - edited @Mike R. Haller I'm using CVS so I have the problem that the release plugin doesn't work for flat project structures correctly. But the other problem you describe about the entry of the reactor/Everything project to the poms of the child projects I also can reconstruct with the <tag> element in the <scm> section.. this is NOT FIXED at all!
          Hide
          Hannes Kogler added a comment -

          please take a look at MRELEASE-138 too

          Show
          Hannes Kogler added a comment - please take a look at MRELEASE-138 too
          Hide
          cforce added a comment -

          I wanna checkout my code from multiple modules! Arg, will this ever be solved????

          Show
          cforce added a comment - I wanna checkout my code from multiple modules! Arg, will this ever be solved????
          Hide
          Nico De Groote added a comment -

          see my issue MRELEASE-636.
          I'm also waiting for the patch to be applied.

          Show
          Nico De Groote added a comment - see my issue MRELEASE-636 . I'm also waiting for the patch to be applied.

            People

            • Assignee:
              Maria Odea Ching
              Reporter:
              paul.whelan@gmail.com
            • Votes:
              58 Vote for this issue
              Watchers:
              60 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: