How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"

Miroslav Nachev
Hi,

When I try to compile any project
with "org.codehaus.mojo:exec-maven-plugin" using JDK 9 or higher (currently
10), I have the following error:
--- exec-maven-plugin:1.6.0:exec (unpack-dependencies) @
JavaFXBinaryWsClientMvn ---
Command execution failed.
java.io.IOException: Cannot run program
"D:\Programs\Java\jdk-10.0.2\..\bin\javafxpackager" (in directory
"D:\Works\Projects\WebSocket\JavaFXBinaryWsClientMvn"): CreateProcess
error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:635)
at
org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:564)
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: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:420)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:151)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 31 more


When I changed the JDK with 1.8, the error disappear. Then I read JDK
documentation and found the following for command "javafxpackager
<https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javafxpackager.html>
":

   - "*Note*: This tool has been renamed javapackager. The
   javafxpackager.exe file may be removed in a future release. Please update
   your scripts to use javapackager.".


So, my question is how can I
configure "org.codehaus.mojo:exec-maven-plugin" to use "javapackager"
instead "javafxpackager"?


Regards,
Miro.
Reply | Threaded
Open this post in threaded view
|

Re: How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"

rfscholte
I'd suggest to add a profile to this project with jdk activation like  
<jdk>[9,)</jdk>.
Here you reconfigure the execution block of the exec-maven-plugin,  
changing the name of the executable to javapackager.

thanks,
Robert

[1]  
https://maven.apache.org/guides/introduction/introduction-to-profiles.html

On Tue, 14 Aug 2018 11:21:51 +0200, Miroslav Nachev  
<[hidden email]> wrote:

> Hi,
>
> When I try to compile any project
> with "org.codehaus.mojo:exec-maven-plugin" using JDK 9 or higher  
> (currently
> 10), I have the following error:
> --- exec-maven-plugin:1.6.0:exec (unpack-dependencies) @
> JavaFXBinaryWsClientMvn ---
> Command execution failed.
> java.io.IOException: Cannot run program
> "D:\Programs\Java\jdk-10.0.2\..\bin\javafxpackager" (in directory
> "D:\Works\Projects\WebSocket\JavaFXBinaryWsClientMvn"): CreateProcess
> error=2, The system cannot find the file specified
> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
> at java.base/java.lang.Runtime.exec(Runtime.java:635)
> at
> org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
> at  
> org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
> at
> org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
> at  
> org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
> at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> 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:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> 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:564)
> 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: java.io.IOException: CreateProcess error=2, The system cannot
> find the file specified
> at java.base/java.lang.ProcessImpl.create(Native Method)
> at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:420)
> at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:151)
> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
> ... 31 more
>
>
> When I changed the JDK with 1.8, the error disappear. Then I read JDK
> documentation and found the following for command "javafxpackager
> <https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javafxpackager.html>
> ":
>
>    - "*Note*: This tool has been renamed javapackager. The
>    javafxpackager.exe file may be removed in a future release. Please  
> update
>    your scripts to use javapackager.".
>
>
> So, my question is how can I
> configure "org.codehaus.mojo:exec-maven-plugin" to use "javapackager"
> instead "javafxpackager"?
>
>
> Regards,
> Miro.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"

Miroslav Nachev-3
In reply to this post by Miroslav Nachev
Hi Robert,

I did it and the problem continues to stand, when using JDK10. Attached is the pom.xml file of a JavaFX sample application.

The command is changed with proper value, but the exception happens again.


Regards,
Miro.

On Tue, Aug 14, 2018 at 7:55 PM, Robert Scholte <[hidden email]> wrote:
I'd suggest to add a profile to this project with jdk activation like <jdk>[9,)</jdk>.
Here you reconfigure the execution block of the exec-maven-plugin, changing the name of the executable to javapackager.

thanks,
Robert

[1] https://maven.apache.org/guides/introduction/introduction-to-profiles.html


On Tue, 14 Aug 2018 11:21:51 +0200, Miroslav Nachev <[hidden email]> wrote:

Hi,

When I try to compile any project
with "org.codehaus.mojo:exec-maven-plugin" using JDK 9 or higher (currently
10), I have the following error:
--- exec-maven-plugin:1.6.0:exec (unpack-dependencies) @
JavaFXBinaryWsClientMvn ---
Command execution failed.
java.io.IOException: Cannot run program
"D:\Programs\Java\jdk-10.0.2\..\bin\javafxpackager" (in directory
"D:\Works\Projects\WebSocket\JavaFXBinaryWsClientMvn"): CreateProcess
error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:635)
at
org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:564)
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: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:420)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:151)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 31 more


When I changed the JDK with 1.8, the error disappear. Then I read JDK
documentation and found the following for command "javafxpackager
<https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javafxpackager.html>
":

   - "*Note*: This tool has been renamed javapackager. The
   javafxpackager.exe file may be removed in a future release. Please update
   your scripts to use javapackager.".


So, my question is how can I
configure "org.codehaus.mojo:exec-maven-plugin" to use "javapackager"
instead "javafxpackager"?


Regards,
Miro.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

pom.xml (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"

rfscholte
Hi Miro,

Please try 

<executable>${JAVA_HOME}/bin/javapackager</executable>

thanks,
Robert

On Wed, 15 Aug 2018 05:43:01 +0200, Miroslav Nachev <[hidden email]> wrote:

Hi Robert,

I did it and the problem continues to stand, when using JDK10. Attached is the pom.xml file of a JavaFX sample application.

The command is changed with proper value, but the exception happens again.


Regards,
Miro.

On Tue, Aug 14, 2018 at 7:55 PM, Robert Scholte <[hidden email]> wrote:
I'd suggest to add a profile to this project with jdk activation like <jdk>[9,)</jdk>.
Here you reconfigure the execution block of the exec-maven-plugin, changing the name of the executable to javapackager.

thanks,
Robert

[1] https://maven.apache.org/guides/introduction/introduction-to-profiles.html


On Tue, 14 Aug 2018 11:21:51 +0200, Miroslav Nachev <[hidden email]> wrote:

Hi,

When I try to compile any project
with "org.codehaus.mojo:exec-maven-plugin" using JDK 9 or higher (currently
10), I have the following error:
--- exec-maven-plugin:1.6.0:exec (unpack-dependencies) @
JavaFXBinaryWsClientMvn ---
Command execution failed.
java.io.IOException: Cannot run program
"D:\Programs\Java\jdk-10.0.2\..\bin\javafxpackager" (in directory
"D:\Works\Projects\WebSocket\JavaFXBinaryWsClientMvn"): CreateProcess
error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:635)
at
org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:564)
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: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:420)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:151)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 31 more


When I changed the JDK with 1.8, the error disappear. Then I read JDK
documentation and found the following for command "javafxpackager
<https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javafxpackager.html>
":

   - "*Note*: This tool has been renamed javapackager. The
   javafxpackager.exe file may be removed in a future release. Please update
   your scripts to use javapackager.".


So, my question is how can I
configure "org.codehaus.mojo:exec-maven-plugin" to use "javapackager"
instead "javafxpackager"?


Regards,
Miro.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]