Maven
  1. Maven
  2. MNG-2045

Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      WinXP

      Description

      I have 2 projects under a parent like so:

      --Parent
      — sample-jar
      — sample-jar-user

      sample-jar builds and installs a test-jar along with the normal jar. sample-jar-user depends on the test-jar at compile time. When I build from the parent folder, the build fails because it can't find the class. When I go to sample-jar-user and build, it works fine.

      In the attached test case, to reproduce:
      from the root folder, run mvn clean install - See it fail.
      cd sample-jar-user; mvn clean install - see it succeed.

      I remember reading somewhere that in multiprojects, maven attempts to locate the sibling classes in the source tree instead of using the jars from the repository. I'm guessing the problem is here that it's not looking in ../sample-jar/target/test-classes for this code, but really one should expect this to come from the repository.

      1. sample.zip
        23 kB
        brianfox
      2. release-log.zip
        150 kB
        Michael Osipov
      3. MNG-2045-maven-project-r577340.patch2
        1 kB
        Paul Gier
      4. MNG-2045-maven-project-r577340.patch1
        0.8 kB
        Paul Gier
      5. mng-2045-ittest.zip
        10 kB
      6. it1021.tar.gz
        1 kB
        Carlos Sanchez

        Issue Links

          Activity

          Brian Fox made changes -
          Reporter Brian E. Fox (imported from Codehaus) [ brianf@infinity.nu ] Brian Fox [ brianf ]
          Brian Fox made changes -
          Assignee Brian Fox [ brianfox ] Brian Fox [ brianf ]
          Mark Thomas made changes -
          Workflow jira [ 12952456 ] Default workflow, editable Closed status [ 12989800 ]
          Mark Thomas made changes -
          Link This issue relates to MWAR-7 [ MWAR-7 ]
          Mark Thomas made changes -
          Link This issue is duplicated by MSITE-432 [ MSITE-432 ]
          Mark Thomas made changes -
          Link This issue relates to MRELEASE-140 [ MRELEASE-140 ]
          Mark Thomas made changes -
          Link This issue relates to MJAR-68 [ MJAR-68 ]
          Mark Thomas made changes -
          Link This issue depends upon MJAR-75 [ MJAR-75 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12712725 ] Default workflow, editable Closed status [ 12755537 ]
          Mark Thomas made changes -
          Link This issue relates to MWAR-7 [ MWAR-7 ]
          Mark Thomas made changes -
          Link This issue is duplicated by MSITE-432 [ MSITE-432 ]
          Mark Thomas made changes -
          Link This issue relates to MRELEASE-140 [ MRELEASE-140 ]
          Mark Thomas made changes -
          Link This issue relates to MJAR-68 [ MJAR-68 ]
          Mark Thomas made changes -
          Link This issue depends upon MJAR-75 [ MJAR-75 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Michael Osipov made changes -
          Attachment release-log.zip [ 62841 ]
          Michael Osipov made changes -
          Link This issue relates to MRELEASE-140 [ MRELEASE-140 ]
          Dennis Lundberg made changes -
          Link This issue is duplicated by MSITE-432 [ MSITE-432 ]
          Dennis Lundberg made changes -
          Link This issue relates to MJAR-68 [ MJAR-68 ]
          Joerg Schaible made changes -
          Link This issue is superceded by MNG-4248 [ MNG-4248 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-2720 [ MNG-2720 ]
          Benjamin Bentmann made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 2.0.11 [ 14118 ]
          Fix Version/s 2.0.8 [ 13139 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-4056 [ MNG-4056 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-4032 [ MNG-4032 ]
          Brett Porter made changes -
          Link This issue relates to MNG-3043 [ MNG-3043 ]
          brianfox made changes -
          Fix Version/s 2.0.8 [ 13139 ]
          Fix Version/s 2.0.11 [ 14118 ]
          brianfox made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-2871 [ MNG-2871 ]
          Josh Chaitin-Pollak made changes -
          Link This issue is related to MNG-3559 [ MNG-3559 ]
          Brett Porter made changes -
          Resolution Fixed [ 1 ]
          Fix Version/s 2.0.8 [ 13139 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Fix Version/s 2.0.9 [ 13801 ]
          brianfox made changes -
          Fix Version/s 2.0.9 [ 13801 ]
          Fix Version/s 2.0.8 [ 13139 ]
          brianfox made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          brianfox made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Brett Porter made changes -
          Fix Version/s 2.0.6 [ 13010 ]
          Fix Version/s 2.0.8 [ 13139 ]
          Paul Gier made changes -
          Attachment MNG-2045-maven-project-r577340.patch2 [ 29512 ]
          Paul Gier made changes -
          Attachment MNG-2045-maven-project-r577340.patch1 [ 29511 ]
          brianfox made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          mtk made changes -
          Attachment mng-2045-ittest.zip [ 29487 ]
          Piotr Tabor made changes -
          Link This issue depends upon MJAR-75 [ MJAR-75 ]
          brianfox made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.1.x [ 13142 ]
          Fix Version/s 2.0.6 [ 13010 ]
          brianfox made changes -
          Link This issue is related to MNG-2877 [ MNG-2877 ]
          brianfox made changes -
          Assignee Brian Fox [ brianfox ]
          Jason van Zyl made changes -
          Fix Version/s 2.1 [ 11704 ]
          Fix Version/s 2.1.x [ 13142 ]
          John Casey made changes -
          Fix Version/s 2.1 [ 11704 ]
          kenneyw made changes -
          Link This issue is related to MDEP-1 [ MDEP-1 ]
          kenneyw made changes -
          Link This issue is related to MDEP-2 [ MDEP-2 ]
          brianfox made changes -
          Link This issue is related to MDEP-1 [ MDEP-1 ]
          brianfox made changes -
          Link This issue is depended upon by MDEP-1 [ MDEP-1 ]
          brianfox made changes -
          Link This issue is depended upon by MDEP-1 [ MDEP-1 ]
          brianfox made changes -
          Link This issue is related to MWAR-7 [ MWAR-7 ]
          brianfox made changes -
          Link This issue is related to MOJO-286 [ MOJO-286 ]
          Carlos Sanchez made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          Carlos Sanchez made changes -
          Field Original Value New Value
          Attachment it1021.tar.gz [ 18977 ]
          Brian E. Fox (imported) created issue -

            People

            • Assignee:
              Brian Fox
              Reporter:
              Brian Fox
            • Votes:
              11 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development