Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-3

Module paths for system scope are relative to parent pom instead of its own

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None
    • Win XP, Maven 2.0

    Description

      When building from the parent POM dir, all paths are relative to it. A problem occurs when its modules have dependencies of <scope>system</scope> - the module's corresponding <systemPath> is relative to the parent POM dir, instead of the module's POM dir.

      With a module's <systemPath> set to compile correctly it on its own, compiling from its parent POM dir gives this error:

      [ERROR] BUILD ERROR
      [INFO] ----------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      GroupId: thegrp
      ArtifactId: subsystem
      Version: 2.1-SNAPSHOT

      Reason: System artifact: thegrp:subsystem:jar:2.1-SNAPSHOT not found in
      path: src\lib\subsystem.jar
      thegrp:subsystem:2.1-SNAPSHOT:jar

      (would be nice to have the fully qualified path name listed there, instead of the relative one so users would know where it is really looking for it
      from)

      Expected behavior is that Maven treats system scope paths relative to the module POM, not the parent's POM.

      Attachments

        1. MNG-1471-maven-project.patch
          2 kB
          Edwin Punzalan

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              jeffjensen Jeff Jensen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified