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 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
    • Complexity:
      Intermediate
    • Testcase included:
      yes
    • Number of attachments :
      6

      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. it1021.tar.gz
        1 kB
        Carlos Sanchez
      2. MNG-2045-maven-project-r577340.patch1
        0.8 kB
        Paul Gier
      3. MNG-2045-maven-project-r577340.patch2
        1 kB
        Paul Gier

        Issue Links

          Activity

          Carlos Sanchez made changes -
          Field Original Value New Value
          Attachment it1021.tar.gz [ 18977 ]
          Carlos Sanchez made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          brianfox brianfox made changes -
          Link This issue is related to MOJO-286 [ MOJO-286 ]
          brianfox brianfox made changes -
          Link This issue is related to MWAR-7 [ MWAR-7 ]
          brianfox brianfox made changes -
          Link This issue is depended upon by MDEP-1 [ MDEP-1 ]
          brianfox brianfox made changes -
          Link This issue is depended upon by MDEP-1 [ MDEP-1 ]
          brianfox brianfox made changes -
          Link This issue is related to MDEP-1 [ MDEP-1 ]
          Kenney Westerhof made changes -
          Link This issue is related to MDEP-2 [ MDEP-2 ]
          Kenney Westerhof 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 ]
          brianfox brianfox made changes -
          Assignee Brian Fox [ brianfox ]
          brianfox brianfox made changes -
          Link This issue is related to MNG-2877 [ MNG-2877 ]
          brianfox brianfox made changes -
          Fix Version/s 2.1.x [ 13142 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.0.6 [ 13010 ]
          Resolution Fixed [ 1 ]
          Piotr Tabor made changes -
          Link This issue depends upon MJAR-75 [ MJAR-75 ]
          Mikko Koponen made changes -
          Attachment mng-2045-ittest.zip [ 29487 ]
          brianfox brianfox made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Paul Gier made changes -
          Paul Gier made changes -
          Brett Porter made changes -
          Fix Version/s 2.0.6 [ 13010 ]
          Fix Version/s 2.0.8 [ 13139 ]
          brianfox brianfox made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          brianfox brianfox made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          brianfox brianfox made changes -
          Fix Version/s 2.0.9 [ 13801 ]
          Fix Version/s 2.0.8 [ 13139 ]
          Brett Porter made changes -
          Fix Version/s 2.0.8 [ 13139 ]
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Fix Version/s 2.0.9 [ 13801 ]
          Joshua 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 ]
          brianfox brianfox made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          brianfox brianfox made changes -
          Fix Version/s 2.0.11 [ 14118 ]
          Fix Version/s 2.0.8 [ 13139 ]
          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 -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          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 ]
          Jörg 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 ]

            People

            • Assignee:
              brianfox brianfox
              Reporter:
              brianfox brianfox
            • Votes:
              11 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: