maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (MJLINK-4) NPE on execution
Date Sun, 15 Oct 2017 21:21:00 GMT

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

Robert Scholte closed MJLINK-4.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0-alpha-2

Fixed in [r1812236| http://svn.apache.org/viewvc?rev=1812236&view=rev]

Key issue was that only the poms were downloaded, without the main artifacts. I've added an
integration test to confirm this.

Thanks for the provided examples and the good intentions for the fix, which n the end was
only a replacement of one word.

> 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
>            Assignee: Robert Scholte
>             Fix For: 3.0.0-alpha-2
>
>
> When I try to run my maven build I get the following exception:
> {noformat}[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}
> {noformat}
> 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)

Mime
View raw message