Maven
  1. Maven
  2. MNG-3259

Regression: Maven drops dependencies in multi-module build

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.7, 2.0.8, 3.0-alpha-1
    • Fix Version/s: 2.0.9
    • Component/s: Dependencies
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Under some circumstances Maven "forgets" about test dependencies in multi-module builds. The affected module can be build only if the build is started from its local project directory. If the build is run from a parent directory, the test fails because of missing classes. This issue applies to M207 and recent M208-RC1, the project can be build without problems with M205 (M206 is completely bogus). The problem was for us already the show stopper for M207 and I thought with some of the now resolved issues it has been gone, but I was wrong. I did not report it earlier, because I was never able to reproduce the problem with a minimal build ... until now and it took me about 3 days to create a demonstrating multi module project.

        Issue Links

          Activity

          Hide
          Jörg Schaible added a comment -

          Is there anywhere a M209-SNAPSHOT available? I am happy to test it myself. I am really eager to get rid of this issue, since it forces us to uses M205 still.

          Show
          Jörg Schaible added a comment - Is there anywhere a M209-SNAPSHOT available? I am happy to test it myself. I am really eager to get rid of this issue, since it forces us to uses M205 still.
          Hide
          Ralph Goers added a comment -

          No. You have to build it your self. To do this you need subversion installed. Then do
          1. Create a directory named apache-maven-2.0.9-SNAPSHOT somewhere
          2. set M2_HOME to point to the apache-maven-2.0.9-SNAPSHOT directory
          3. From a directory where you want the maven source do svn co https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/
          4 cd to maven-2.0.x
          5 run ./bootstrap.sh
          6 add M2_HOME/bin to the beginning of your path
          7 do mvn -v and verify that your version is 2.0.9-SNAPSHOT.

          Note that I am not claiming that anything was fixed. I just couldn't duplicate the problem on Windows with Java 5.

          Show
          Ralph Goers added a comment - No. You have to build it your self. To do this you need subversion installed. Then do 1. Create a directory named apache-maven-2.0.9-SNAPSHOT somewhere 2. set M2_HOME to point to the apache-maven-2.0.9-SNAPSHOT directory 3. From a directory where you want the maven source do svn co https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/ 4 cd to maven-2.0.x 5 run ./bootstrap.sh 6 add M2_HOME/bin to the beginning of your path 7 do mvn -v and verify that your version is 2.0.9-SNAPSHOT. Note that I am not claiming that anything was fixed. I just couldn't duplicate the problem on Windows with Java 5.
          Hide
          brianfox brianfox added a comment -

          Hi Ralph, you need 1.4 to duplicate it.

          Show
          brianfox brianfox added a comment - Hi Ralph, you need 1.4 to duplicate it.
          Hide
          John Casey added a comment -

          I just tested this on OS X and WinXP, using maven 2.0.7, 2.0.8, and 2.0.9-SNAPSHOT from revId: 630321. All of my tests used JDK 1.4.

          In the cases of 2.0.8 and 2.0.9-SNAPSHOT on OS X, it didn't fail.

          In the cases of 2.0.7 and 2.0.8 on WinXP, it failed.

          In the case of 2.0.9-SNAPSHOT on WinXP, it didn't fail.

          I'm not sure, but it looks like it has been fixed inadvertently...not a great thing to say, but there you go. I'd welcome some more eyes on this issue, to see if you can prove me wrong/crazy/something.

          I built a distro from that revision, and parked it here:

          http://people.apache.org/~jdcasey/maven-drops/2.0.9-SNAPSHOT

          Please reopen this issue if you can't replicate my success.

          Show
          John Casey added a comment - I just tested this on OS X and WinXP, using maven 2.0.7, 2.0.8, and 2.0.9-SNAPSHOT from revId: 630321. All of my tests used JDK 1.4. In the cases of 2.0.8 and 2.0.9-SNAPSHOT on OS X, it didn't fail. In the cases of 2.0.7 and 2.0.8 on WinXP, it failed. In the case of 2.0.9-SNAPSHOT on WinXP, it didn't fail. I'm not sure, but it looks like it has been fixed inadvertently...not a great thing to say, but there you go. I'd welcome some more eyes on this issue, to see if you can prove me wrong/crazy/something. I built a distro from that revision, and parked it here: http://people.apache.org/~jdcasey/maven-drops/2.0.9-SNAPSHOT Please reopen this issue if you can't replicate my success.
          Hide
          Jörg Schaible added a comment -

          Although I feel a bit uncomfortable, if such a problem suddenly vanished without identification of the originating reason, I have to confirm that this SNAPSHOT is the first version since M205 that builds our complete project tree without any problem:

          =========== %< =========
          [SNIP]
          ...
          [INFO] ------------------------------------------------------------------------
          [INFO] Reactor Summary:
          [INFO] ------------------------------------------------------------------------
          ...
          [SNIP]289 projects
          ...
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESSFUL
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 44 minutes 3 seconds
          [INFO] Finished at: Mon Feb 25 09:59:29 CET 2008
          [INFO] Final Memory: 160M/254M
          [INFO] ------------------------------------------------------------------------
          =========== %< =========

          This is really such a great relief! Thanks to all of you looking into this!
          BTW John, when did you claim, M209 is gonna released? GO GO GO GO

          Show
          Jörg Schaible added a comment - Although I feel a bit uncomfortable, if such a problem suddenly vanished without identification of the originating reason, I have to confirm that this SNAPSHOT is the first version since M205 that builds our complete project tree without any problem: =========== %< ========= [SNIP] ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ ... [SNIP] 289 projects ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44 minutes 3 seconds [INFO] Finished at: Mon Feb 25 09:59:29 CET 2008 [INFO] Final Memory: 160M/254M [INFO] ------------------------------------------------------------------------ =========== %< ========= This is really such a great relief! Thanks to all of you looking into this! BTW John, when did you claim, M209 is gonna released? GO GO GO GO

            People

            • Assignee:
              John Casey
              Reporter:
              Jörg Schaible
            • Votes:
              6 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 - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h