NPE in resolver if artifact defined with a version range
--------------------------------------------------------

                 Key: MNG-4047
                 URL: http://jira.codehaus.org/browse/MNG-4047
             Project: Maven 2
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.0.9
         Environment: Mac OS X, Maven 2.0.9
            Reporter: Alex Miller
         Attachments: out.txt

I'm seeing the following NPE when calling the ArtifactResolver with an Artifact 
defined by a VersionRange.  Here the version for this artifact is defined as 
"[1.0.0-SNAPSHOT,1.1.0-SNAPSHOT)" and the 1.0.0-SNAPSHOT artifact is in my 
local repository.  

java.lang.NullPointerException: version was null for 
org.terracotta:terracotta-test-api
        at 
org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:362)
        at 
org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout.pathOf(DefaultRepositoryLayout.java:47)
        at 
org.apache.maven.artifact.repository.DefaultArtifactRepository.pathOf(DefaultArtifactRepository.java:110)
        at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:125)
        at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
        at 
org.terracotta.maven.plugins.tc.DsoArtifactResolverImpl.resolveArtifact(DsoArtifactResolverImpl.java:82)
        at 
org.terracotta.maven.plugins.tc.ManifestMojo.generateRequiredBundles(ManifestMojo.java:336)
        at 
org.terracotta.maven.plugins.tc.ManifestMojo.createManifest(ManifestMojo.java:272)
        at 
org.terracotta.maven.plugins.tc.ManifestMojo.execute(ManifestMojo.java:205)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)

The tc-maven-plugin source can be perused here:
http://svn.terracotta.org/svn/forge/projects/tc-maven-plugin/trunk




-- 
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