karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emily Berk (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-5311) NPE in karaf-maven-plugin when specifying descriptor by file url
Date Thu, 31 Aug 2017 19:36:00 GMT

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

Emily Berk updated KARAF-5311:
------------------------------
    Description: 
Upgrading from Karaf 4.1.1 to 4.1.2 caused the build to fail with 

{code}
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository: NullPointerException
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	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:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error populating repository
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:267)
	at org.apache.karaf.tooling.features.AddToRepositoryMojo.execute(AddToRepositoryMojo.java:58)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: java.lang.NullPointerException
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.retrieveDescriptorsRecursively(AbstractFeatureMojo.java:125)
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:236)
	... 23 more
{code}

My {{karaf-maven-plugin}} is configured 
{code:xml}
<plugin>
    <groupId>org.apache.karaf.tooling</groupId>
    <artifactId>karaf-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>features-add-to-repository</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>features-add-to-repository</goal>
            </goals>
            <configuration>
                <addTransitiveFeatures>false</addTransitiveFeatures>
                <descriptors>
                    <descriptor>file:${basedir}/target/classes/${project.artifactId}-features.xml</descriptor>
                </descriptors>
                <repository>${setup.folder}/${karaf.folder}/system</repository>
            </configuration>
        </execution>
    </executions>
</plugin>
{code}
This worked fine in 4.1.1, but it looks like KARAF-3347 caused specifying the descriptor with
{{file:}} to no longer work.

  was:
Upgrading from Karaf 4.1.1 to 4.1.2 caused the build to fail with 

{code}
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository: NullPointerException
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	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:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error populating repository
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:267)
	at org.apache.karaf.tooling.features.AddToRepositoryMojo.execute(AddToRepositoryMojo.java:58)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: java.lang.NullPointerException
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.retrieveDescriptorsRecursively(AbstractFeatureMojo.java:125)
	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:236)
	... 23 more
{code}

My {{karaf-maven-plugin}} is configured 
{code:xml}
<plugin>
    <groupId>org.apache.karaf.tooling</groupId>
    <artifactId>karaf-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>features-add-to-repository</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>features-add-to-repository</goal>
            </goals>
            <configuration>
                <addTransitiveFeatures>false</addTransitiveFeatures>
                <descriptors>
                    <descriptor>file:${basedir}/target/classes/${project.artifactId}-features.xml</descriptor>
                </descriptors>
                <repository>${setup.folder}/${karaf.folder}/system</repository>
            </configuration>
        </execution>
    </executions>
</plugin>
{code}
This worked fine in 4.1.1, but it looks like KARAF-3347 caused specifying the descriptor with
{{file:}} to no longer work. Updating this to 
{code:xml}
<descriptor>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</descriptor>
{code}
appears to be a work-around.


> NPE in karaf-maven-plugin when specifying descriptor by file url
> ----------------------------------------------------------------
>
>                 Key: KARAF-5311
>                 URL: https://issues.apache.org/jira/browse/KARAF-5311
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 4.1.2
>            Reporter: Emily Berk
>
> Upgrading from Karaf 4.1.1 to 4.1.2 caused the build to fail with 
> {code}
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository: NullPointerException
-> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.2:features-add-to-repository
(features-add-to-repository) on project myProject: Error populating repository
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
> 	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:116)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error populating repository
> 	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:267)
> 	at org.apache.karaf.tooling.features.AddToRepositoryMojo.execute(AddToRepositoryMojo.java:58)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> 	... 20 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.karaf.tooling.features.AbstractFeatureMojo.retrieveDescriptorsRecursively(AbstractFeatureMojo.java:125)
> 	at org.apache.karaf.tooling.features.AbstractFeatureMojo.resolveFeatures(AbstractFeatureMojo.java:236)
> 	... 23 more
> {code}
> My {{karaf-maven-plugin}} is configured 
> {code:xml}
> <plugin>
>     <groupId>org.apache.karaf.tooling</groupId>
>     <artifactId>karaf-maven-plugin</artifactId>
>     <executions>
>         <execution>
>             <id>features-add-to-repository</id>
>             <phase>prepare-package</phase>
>             <goals>
>                 <goal>features-add-to-repository</goal>
>             </goals>
>             <configuration>
>                 <addTransitiveFeatures>false</addTransitiveFeatures>
>                 <descriptors>
>                     <descriptor>file:${basedir}/target/classes/${project.artifactId}-features.xml</descriptor>
>                 </descriptors>
>                 <repository>${setup.folder}/${karaf.folder}/system</repository>
>             </configuration>
>         </execution>
>     </executions>
> </plugin>
> {code}
> This worked fine in 4.1.1, but it looks like KARAF-3347 caused specifying the descriptor
with {{file:}} to no longer work.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message