systemPath for system-scope dependencies missing in release pom
---------------------------------------------------------------

                 Key: MRELEASE-367
                 URL: http://jira.codehaus.org/browse/MRELEASE-367
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-7
         Environment: linux-x64, jdk1.6
            Reporter: Andy Martin


The following dependency exists in the project POM:

        <dependency>
            <groupId>sun.jdk</groupId>
            <artifactId>tools</artifactId>
            <version>1.6.0</version>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
            <scope>system</scope>
        </dependency>

This comes through to the release POM as:

    <dependency>
      <groupId>sun.jdk</groupId>
      <artifactId>tools</artifactId>
      <version>1.6.0</version>
      <scope>system</scope>
    </dependency>

Which results in a compile error as system scope requires a systemPath value. 
This occurs on the project with the system dependency as well as all projects 
which have that component as a dependency.

What is not clear in the code is that createReleaseDependencies() uses 
project.getArtifacts() rather than project.getDependencies(), and artifacts 
don't have a systemPath property. I have experimented with code to scan the 
dependencies for the Dependency instance matching the Artifact and getting 
systemPath from that, but that approach only works where it is a direct 
dependency, not where it is inherited.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to