[Commented] (MJLINK-4) NPE on execution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (MJLINK-4) NPE on execution

JIRA jira@apache.org

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

Antonio Petrelli commented on MJLINK-4:
---------------------------------------

Hello
as you may notice I submitted a pull request for the fix. It works for me. I gathered info from:
https://vzurczak.wordpress.com/2016/01/08/finding-dependencies-artifacts-in-your-maven-plug-in/
The upgrade to Maven 3.1.1 (I was cautious on this) was due to a problem like this:
https://github.com/mrice/license-check/issues/8

> NPE on execution
> -----------------
>
>                 Key: MJLINK-4
>                 URL: https://issues.apache.org/jira/browse/MJLINK-4
>             Project: Maven JLink Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-1
>         Environment: Ubuntu 16.04.3 LTS
> Linux 4.4.0-93-generic
>            Reporter: Johannes Boesl
>
> When I try to run my maven build I get the following exception:
> {quote}[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink) on project jloadr-jre: Execution default-jlink of goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink failed.: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink) on project jloadr-jre: Execution default-jlink of goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink failed.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:200)
> at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
> at java.base/java.lang.Thread.run(Thread.java:844)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-jlink of goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink failed.
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 11 more
> Caused by: java.lang.NullPointerException
> at org.codehaus.plexus.languages.java.jpms.ResolvePathsRequest$1.toPath(ResolvePathsRequest.java:52)
> at org.codehaus.plexus.languages.java.jpms.ResolvePathsRequest$1.toPath(ResolvePathsRequest.java:48)
> at org.codehaus.plexus.languages.java.jpms.LocationManager.resolvePaths(LocationManager.java:109)
> at org.apache.maven.plugins.jlink.JLinkMojo.preparePaths(JLinkMojo.java:347)
> at org.apache.maven.plugins.jlink.JLinkMojo.execute(JLinkMojo.java:264)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> ... 12 more{quote}
> The cause seems to be that the following code in line 337 in JLinkMojo returns a collection with only 'null' entries:
> {{Collection<File> dependencyArtifacts = getCompileClasspathElements( getProject() );}}



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