Maven Eclipse Plugin
  1. Maven Eclipse Plugin
  2. MECLIPSE-708

mvn eclipse:eclipse fails with NullPointerException on Java 7 if pom.xml contains version range

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.8
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Win 7 (32 Bit), JDK 1.7.0_02, MVN 3.0.3, de_DE, Cp1252
    • Number of attachments :
      0

      Description

      If pom.xml contains version range (e. g. like this one:

      <dependencies>
      <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>jsr311-api</artifactId>
      <version>[1.1,1.2)</version>
      </dependency>
      </dependencies>

      ) and JDK 1.7.0_02 is used, mvn eclipse:eclipse fails with NullPointerException:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8:eclipse (default-cli) on project webdav-jaxrs: Execution default-cli of goal org.apache.maven.plugins:maven-eclipse-plugin:2.8:eclipse failed. NullPointerException -> [Help 1]

      The bug location seems to be around this place:

      Caused by: java.lang.NullPointerException
      at org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:353)
      at org.apache.maven.artifact.versioning.ComparableVersion.<init>(ComparableVersion.java:344)
      at org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.java:111)
      at org.apache.maven.artifact.versioning.DefaultArtifactVersion.<init>(DefaultArtifactVersion.java:47)
      at org.apache.maven.artifact.DefaultArtifact.compareTo(DefaultArtifact.java:433)
      at org.apache.maven.artifact.DefaultArtifact.compareTo(DefaultArtifact.java:43)
      at java.util.TreeMap.compare(TreeMap.java:1188)
      at java.util.TreeMap.put(TreeMap.java:531)
      at java.util.TreeSet.add(TreeSet.java:255)
      at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.getProjectArtifacts(AbstractIdeSupportMojo.java:786)
      at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.doDependencyResolution(AbstractIdeSupportMojo.java:560)
      at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:507)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      ... 20 more

        Activity

        No changes have yet been made on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Markus KARG
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: