Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3288

Invalid systemPath allows build to continue--failing in later phase.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.7
    • 2.0.9
    • Dependencies
    • None

    Description

      When the system scoped dependency is specified as follows:

      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>system</scope>
      <systemPath>${env.USERPROFILE}/.m2/repository/junit/junit/3.8.1/junit-3.8.2.jar</systemPath>
      </dependency>

      Maven fails and complains correctly (junit-3.8.2.jar is incorrect, and should be junit-3.8.1.jar).

      However, when the following is used:

      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>system</scope>
      <systemPath>${env.USERPROFILE}/.m2/repository/junit/junit</systemPath>
      </dependency>

      Maven DOES NOT COMPLAIN, the build process proceeds and fails later in the compile/testCompile build phases since the dependency is not available. You can see attached minimal project.

      FYI-This was tested on a Windows XP system, I have not yet tried to replicate this issue on *nix.

      Attachments

        Issue Links

          Activity

            People

              siveton Siveton Vincent
              ds-crcpress David Siefert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: