jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Integration for Eclipse
  • MNGECLIPSE-388

[mng] NPE in Embedder when resolving system dependency

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.0.11
  • Fix Version/s: None
  • Component/s: Maven Embedder
  • Labels:
    None

Description

dependency resolver fail in some cases when system scope dependency is used

java.lang.NullPointerException
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:107)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:76)
at org.maven.ide.eclipse.embedder.EclipseArtifactResolver.resolve(EclipseArtifactResolver.java:57)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:539)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildWithDependencies(DefaultMavenProjectBuilder.java:350)
at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies(MavenEmbedder.java:466)
at org.maven.ide.eclipse.embedder.MavenModelManager.readMavenProject(MavenModelManager.java:377)
at org.maven.ide.eclipse.embedder.BuildPathManager.resolveClasspathEntries(BuildPathManager.java:232)
at org.maven.ide.eclipse.embedder.BuildPathManager.updateClasspathContainer(BuildPathManager.java:193)
at org.maven.ide.eclipse.container.Maven2Builder.build(Maven2Builder.java:92)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
...

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    MNGECLIPSE-157.zip
    15/Sep/07 11:18 PM
    1.03 MB
    Eugene Kuleshov
    1. File
      MNGECLIPSE-157child/.classpath 0.2 kB
    2. File
      MNGECLIPSE-157child/.project 0.6 kB
    3. File
      MNGECLIPSE-157child/.../org.eclipse.jdt.core.prefs 0.2 kB
    4. XML File
      MNGECLIPSE-157child/pom.xml 0.5 kB
    5. File
      MNGECLIPSE-157parent/.classpath 0.3 kB
    6. File
      MNGECLIPSE-157parent/.project 0.6 kB
    7. File
      MNGECLIPSE-157parent/.../org.eclipse.core.resources.prefs 0.1 kB
    8. File
      MNGECLIPSE-157parent/.../org.eclipse.jdt.core.prefs 0.2 kB
    9. Java Archive File
      MNGECLIPSE-157parent/.../xercesImpl-2.7.1.jar 1.15 MB
    10. XML File
      MNGECLIPSE-157parent/pom.xml 0.8 kB
    Download Zip
    Show
    Zip Archive
    MNGECLIPSE-157.zip
    15/Sep/07 11:18 PM
    1.03 MB
    Eugene Kuleshov

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Eugene Kuleshov added a comment - 15/Sep/07 11:18 PM

Jason, can you please take a look at this

Show
Eugene Kuleshov added a comment - 15/Sep/07 11:18 PM Jason, can you please take a look at this
Hide
Permalink
John Casey added a comment - 25/Oct/07 1:23 PM

Currently, system scope and system path will not be injected into transitive dependencies from the dependencyManagement map. These options are only injected into first-level dependencies (direct dependencies) when the project instance is created. For transitive dependencies, only the versions are passed through the transitive graph. The attached example project has a dependencyManagement element for xerces, but only directly declares a dependency on jaxen...if xerces is a transitive dependency brought in by jaxen, it's scope and systemPath will not be set.

Show
John Casey added a comment - 25/Oct/07 1:23 PM Currently, system scope and system path will not be injected into transitive dependencies from the dependencyManagement map. These options are only injected into first-level dependencies (direct dependencies) when the project instance is created. For transitive dependencies, only the versions are passed through the transitive graph. The attached example project has a dependencyManagement element for xerces, but only directly declares a dependency on jaxen...if xerces is a transitive dependency brought in by jaxen, it's scope and systemPath will not be set.
Hide
Permalink
Eugene Kuleshov added a comment - 25/Oct/07 1:27 PM

John, if using system dependencies in dependency management is not supported then it should give a clear error, but not the NPE.

Show
Eugene Kuleshov added a comment - 25/Oct/07 1:27 PM John, if using system dependencies in dependency management is not supported then it should give a clear error, but not the NPE.
Hide
Permalink
John Casey added a comment - 25/Oct/07 1:58 PM

yeah, that is an interesting point that it seems to be starting to look at it as if it were a system dep...back to the code, I guess.

Show
John Casey added a comment - 25/Oct/07 1:58 PM yeah, that is an interesting point that it seems to be starting to look at it as if it were a system dep...back to the code, I guess.
Hide
Permalink
John Casey added a comment - 25/Oct/07 2:26 PM

the NPE should be fixed in the newest snapshot of maven-artifact.

Show
John Casey added a comment - 25/Oct/07 2:26 PM the NPE should be fixed in the newest snapshot of maven-artifact.
Hide
Permalink
John Casey added a comment - 29/Oct/07 10:11 AM

Eugene, is this still happening?

Show
John Casey added a comment - 29/Oct/07 10:11 AM Eugene, is this still happening?
Hide
Permalink
Eugene Kuleshov added a comment - 29/Oct/07 10:53 AM

In my recollection, there is no NPE anymore, but dependency is not resolved anyways, but I need to check that again to be sure.

Show
Eugene Kuleshov added a comment - 29/Oct/07 10:53 AM In my recollection, there is no NPE anymore, but dependency is not resolved anyways, but I need to check that again to be sure.
Hide
Permalink
Eugene Kuleshov added a comment - 11/Apr/08 12:18 AM - edited

John, for those test projects I am getting error: "Missing indirectly referenced artifact xerces:xercesImpl:jar:2.7.1:system"

I guess it is because of the following declaration in the parent pom, but not sure how to make it work without using ${basedir}. Note that xerces is just an example and users been trying to use proprietary libraries that they can't or don't want to put into Maven repository.

<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.7.1</version>
        <scope>system</scope>
        <systemPath>$\{basedir\}/lib/xercesImpl-2.7.1.jar</systemPath>
      </dependency>
    </dependencies>
  </dependencyManagement>
Show
Eugene Kuleshov added a comment - 11/Apr/08 12:18 AM - edited John, for those test projects I am getting error: "Missing indirectly referenced artifact xerces:xercesImpl:jar:2.7.1:system" I guess it is because of the following declaration in the parent pom, but not sure how to make it work without using ${basedir}. Note that xerces is just an example and users been trying to use proprietary libraries that they can't or don't want to put into Maven repository.
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.7.1</version>
        <scope>system</scope>
        <systemPath>$\{basedir\}/lib/xercesImpl-2.7.1.jar</systemPath>
      </dependency>
    </dependencies>
  </dependencyManagement>

People

  • Assignee:
    Unassigned
    Reporter:
    Eugene Kuleshov
Vote (0)
Watch (1)

Dates

  • Created:
    15/Sep/07 11:17 PM
    Updated:
    28/May/08 12:26 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.