You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/07/15 07:44:00 UTC

[jira] [Comment Edited] (FELIX-6548) NPE with Maven Embedder in Eclipse in org.apache.felix:maven-bundle-plugin:5.1.7:manifest

    [ https://issues.apache.org/jira/browse/FELIX-6548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567134#comment-17567134 ] 

Konrad Windszus edited comment on FELIX-6548 at 7/15/22 7:43 AM:
-----------------------------------------------------------------

This seems to be another regression of FELIX-6493. [~HannesWellmann] Can you have a look? This seems to be triggered when the goal is executed when the artifact has not yet been attached (https://github.com/apache/felix-dev/blob/28b4c77883b8dbdea06e723dc4e5a3eba7393f34/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java#L436)


was (Author: kwin):
This seems to be another regression of FELIX-6493. [~HannesWellmann] Can you have a look?

> NPE with Maven Embedder in Eclipse in org.apache.felix:maven-bundle-plugin:5.1.7:manifest
> -----------------------------------------------------------------------------------------
>
>                 Key: FELIX-6548
>                 URL: https://issues.apache.org/jira/browse/FELIX-6548
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-5.1.7
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When running the goal "manifest" with the Eclipse embedded Maven Runtime 3.8.4 it fails with:
> {code}
> [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:5.1.7:manifest (scr-metadata) on project oak-store-composite: Execution scr-metadata of goal org.apache.felix:maven-bundle-plugin:5.1.7:manifest failed: Cannot invoke "java.io.File.toPath()" because the return value of "org.apache.maven.project.MavenProject.getFile()" is null -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:5.1.7:manifest (scr-metadata) on project oak-store-composite: Execution scr-metadata of goal org.apache.felix:maven-bundle-plugin:5.1.7:manifest failed: Cannot invoke "java.io.File.toPath()" because the return value of "org.apache.maven.project.MavenProject.getFile()" is null
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution scr-metadata of goal org.apache.felix:maven-bundle-plugin:5.1.7:manifest failed: Cannot invoke "java.io.File.toPath()" because the return value of "org.apache.maven.project.MavenProject.getFile()" is null
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> 	... 20 more
> Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because the return value of "org.apache.maven.project.MavenProject.getFile()" is null
> 	at org.apache.felix.bundleplugin.ManifestPlugin.isMetadataUpToDate(ManifestPlugin.java:436)
> 	at org.apache.felix.bundleplugin.ManifestPlugin.execute(ManifestPlugin.java:108)
> 	at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:380)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> 	... 21 more
> {code}
> On command line with Maven 3.8.6 it runs fine. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)