Quantcast

generate-features-file NullPointerException

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

generate-features-file NullPointerException

dfontaine
Hi,

I try to create a feature file with maven(version 3.0.4) and features-maven-plugin (Version 2.2.5) but i have an error with the dependency

<dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-camel</artifactId>
        <version>5.5.1</version>
</dependency>

[ERROR] Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.2.5:generate-features-file (generate-features-file) on project karaf-features: Unable to create dependencies file: java.lang.NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.2.5:generate-features-file (generate-features-file) on project karaf-features: Unable to create dependencies file: java.lang.NullPointerException
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to create dependencies file: java.lang.NullPointerException
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.execute(GenerateFeaturesFileMojo.java:179)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.NullPointerException
        at java.util.ArrayList.addAll(ArrayList.java:472)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.getDependencies(GenerateFeaturesFileMojo.java:433)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.writeBundle(GenerateFeaturesFileMojo.java:285)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.writeBundle(GenerateFeaturesFileMojo.java:293)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.writeBundle(GenerateFeaturesFileMojo.java:293)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.writeBundle(GenerateFeaturesFileMojo.java:293)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.writeProjectDependencyFeatures(GenerateFeaturesFileMojo.java
:257)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.populateProperties(GenerateFeaturesFileMojo.java:198)
        at org.apache.karaf.tooling.features.GenerateFeaturesFileMojo.execute(GenerateFeaturesFileMojo.java:173)
        ... 21 more

And when i remove the dependency on activemq-camel, the xml file is generated without exception.

Regards,

Damien
Loading...