javafx-maven-plugin
javafx-maven-plugin copied to clipboard
javafx:jlink if no configuration 'workingDirectory' java.lang.NullPointerException occurred
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<configuration>
<stripDebug>false</stripDebug>
<compress>2</compress>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<launcher>hellofx</launcher>
<jlinkImageName>hello</jlinkImageName>
<jlinkZipName>hellozip</jlinkZipName>
<mainClass>org.openjfx.App</mainClass>
<!-- <workingDirectory>${project.basedir}</workingDirectory>--> <!-- if no configuration >
</configuration>
<executions>
<execution>
<id>run</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>jlink</id>
<phase>compile</phase>
<goals>
<goal>jlink</goal>
</goals>
</execution>
</executions>
</plugin>
console:
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.openjfx:javafx-maven-plugin:0.0.4:jlink failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 21 more
Caused by: java.lang.NullPointerException
at org.openjfx.JavaFXBaseMojo.getExecutablePath(JavaFXBaseMojo.java:368)
at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:154)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 22 more
but! javafx:run work fine.
I have the same problem, what kind of path to write inside of it? Also, if you transfer the zip launcher file to another pc the launcher will still run?
Same problem here. Works fine with javafx:run too
I can also confirm this, I followed the example code here: https://github.com/openjfx/samples/blob/master/CommandLine/Modular/Maven/hellofx/pom.xml (which uses version 0.0.3 of the plugin), when I updated it to 0.0.4 the jlink goal threw the same NPE as above. Adding the workingDirectory fixed it.