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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development