felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-2681) NPE in assertMinScrAnnotationArtifactVersion when checking min. version of annotations dependency
Date Tue, 02 Nov 2010 19:16:24 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Felix Meschberger updated FELIX-2681:
-------------------------------------

    Fix Version/s:     (was:  maven-scr-plugin-1.6.0)
                   maven-scr-plugin-1.6.2
         Assignee: Felix Meschberger

> NPE in assertMinScrAnnotationArtifactVersion when checking min. version of annotations
dependency
> -------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2681
>                 URL: https://issues.apache.org/jira/browse/FELIX-2681
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions:  maven-scr-plugin-1.6.0
>         Environment: windows 7 64bit
>            Reporter: Stefan Seifert
>            Assignee: Felix Meschberger
>             Fix For: maven-scr-plugin-1.6.2
>
>
> i tested the scr plugin 1.6.0 from the staging repository:
> https://repository.apache.org/content/repositories/orgapachefelix-010/
> with a complex project consisting of mutliple osgi bundles and custom annotation tag
providers.
> compiling this set of maven projects/osgi bundles fails with this stackstrace:
> java.lang.NullPointerException
>         at org.apache.maven.artifact.DefaultArtifact.getSelectedVersion(DefaultArtifact.java:621)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.assertMinScrAnnotationArtifactVersion(SCRDescriptorMojo.java:249)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.getClassPath(SCRDescriptorMojo.java:216)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:167)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> the annotations dependeny is declared like this:
>       <dependency>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>org.apache.felix.scr.annotations</artifactId>
>         <version>1.4.0</version>
>         <scope>compile</scope>
>       </dependency>
> debugging shows that the "versionrange" member variable of the artifact is null.
> if i change the version declaration to 
>         <version>[1.4.0,)</version>
> the stacktrace changes:
> java.lang.NullPointerException
>         at org.apache.maven.artifact.versioning.DefaultArtifactVersion.compareTo(DefaultArtifactVersion.java:54)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.assertMinScrAnnotationArtifactVersion(SCRDescriptorMojo.java:250)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.getClassPath(SCRDescriptorMojo.java:216)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:167)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> because the value returned by getSelectedVersion() is null.
> please note: the annotation depency is not declared in the project that fails to compile,
but in a project the failing project depends upon (transitive dependency).
> looking on the documentation of the Artifact interface i'm not sure if the getSelectedVersion()
method is really intended to be used by plugins.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message