maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miroslav Nachev <mnac...@nscenter.eu>
Subject Re: How to change "javafxpackager" with "javapackager" in "org.codehaus.mojo:exec-maven-plugin"
Date Wed, 15 Aug 2018 03:43:01 GMT
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 <rfscholte@apache.org>
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 <
> mnachev.nscenter.eu@gmail.com> 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(DefaultExecut
>> or.java:279)
>> at
>> org.apache.commons.exec.DefaultExecutor.executeInternal(Defa
>> ultExecutor.java:336)
>> at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecu
>> tor.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.executeMoj
>> o(DefaultBuildPluginManager.java:134)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>> oExecutor.java:207)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>> oExecutor.java:153)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj
>> oExecutor.java:145)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b
>> uildProject(LifecycleModuleBuilder.java:116)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b
>> uildProject(LifecycleModuleBuilder.java:80)
>> at
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.S
>> ingleThreadedBuilder.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.invo
>> ke(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.launchEnha
>> nced(Launcher.java:289)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau
>> ncher.java:229)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx
>> itCode(Launcher.java:415)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc
>> her.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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
View raw message