[
https://issues.apache.org/jira/browse/MJLINK-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17126635#comment-17126635
]
Michael Ellis edited comment on MJLINK-42 at 6/5/20, 10:38 AM:
---------------------------------------------------------------
I have the same issue.
*WHEN BUILDING FROM THE COMMAND LINE*
However, when issue the *mvn install* install command from the top level of my
modular project, it works, but when I cs into the *mod-jlink* directory and
perform the *mvn install* it fails with:
```
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.soebes.examples.jdk9:mod-jlink >-----------------
[INFO] Building mod-jlink 1.0-SNAPSHOT
[INFO] -------------------------------[ jlink ]--------------------------------
[INFO]
[INFO] — maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink) @ mod-jlink —
[INFO] Toolchain in maven-jlink-plugin: jlink [
/Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home/bin/jlink ]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.845 s
[INFO] Finished at: 2020-06-05T11:28:12+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink)
on project mod-jlink: Execution default-jlink of goal
org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alp
```
*WHEN BUILDING FROM NETBEANS IDE*
I get the same failure whether building the overall main project or just the
mod-jlink project.
Just discovered that I can fix things so the NetBeans can build the overall
project by upgrading NetBeans to use 3.6.1 maven (rather than the maven that is
bundled with Netbeans 11.3). However, just the command line invocation,
NetBeans it fails to build if you explicitly select the mod-jlink project for
building.
was (Author: michael51773):
I have the same issue.
*WHEN BUILDING FROM THE COMMAND LINE*
However, when issue the *mvn install* install command from the top level of my
modular project, it works, but when I cs into the *mod-jlink* directory and
perform the *mvn install* it fails with:
```
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.soebes.examples.jdk9:mod-jlink >-----------------
[INFO] Building mod-jlink 1.0-SNAPSHOT
[INFO] -------------------------------[ jlink ]--------------------------------
[INFO]
[INFO] --- maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink) @ mod-jlink
---
[INFO] Toolchain in maven-jlink-plugin: jlink [
/Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home/bin/jlink ]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.845 s
[INFO] Finished at: 2020-06-05T11:28:12+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink)
on project mod-jlink: Execution default-jlink of goal
org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alp
```
*WHEN BUILDING FROM NETBEANS IDE*
I get the same failure whether building the overall main project or just the
mod-jlink project.
> NullPointerException when running jlink:jlink
> ---------------------------------------------
>
> Key: MJLINK-42
> URL: https://issues.apache.org/jira/browse/MJLINK-42
> Project: Maven JLink Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha-1
> Environment: macOS 10.14.6
> openjdk version "11.0.4" 2019-07-16 LTS
> OpenJDK Runtime Environment Zulu11.33+15-CA (build 11.0.4+11-LTS)
> OpenJDK 64-Bit Server VM Zulu11.33+15-CA (build 11.0.4+11-LTS, mixed mode)
> Reporter: Dominique Gunia
> Priority: Major
>
> Hi!
> I am getting a NullPointerException when running jlink:jlink:
> {code:java}
> Execution default-cli 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:224)
> 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:120)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 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.PluginExecutionException: Execution
> default-cli 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:143)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 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:132)
> ... 20 more
> {code}
> Is this a known problem? How can it be fixed?
> Thank you very much! :)
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)