Closed marcbux closed 9 years ago
It looks like maven didn't download the launch4j plugin. Launch4j is only needed to build the windows .exe version. It's a maven plugin that's run in the package phase. Unfortunately, when running maven clean install, I run into the same error.
This issue should be reproducible fairly easy. On a fresh Ubuntu 14.04 VM, just run
sudo apt-get install -y maven git git clone https://github.com/karamelchef/karamel.git cd karamel mvn install
Ok, i checked this out and think I fixed it. I had a dependency on a repo and replaced it with a maven dependency. I pushed it straight to the master and I did a new release to karamel.io. Let me know if it's still a problem.
Unfortunately, it still doesn't work for me. This is the error mesage in more detail:
[ERROR]
net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at net.sf.launch4j.Builder.build(Builder.java:146)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:336)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at net.sf.launch4j.Util.exec(Util.java:160)
at net.sf.launch4j.Cmd.exec(Builder.java:212)
at net.sf.launch4j.Builder.build(Builder.java:96)
... 22 more
Caused by: java.io.IOException: Cannot run program "/home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at net.sf.launch4j.Util.exec(Util.java:128)
... 24 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.
I have tried to replicate this without any success. I added another dependency, but I am not sure if this will work. Does the path /home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/ exist? Does the file exist: /home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres
I added explicitly the dependency to this package, although it should have been pulled down as a transative dependency.
This is low priority for me. You can still just use wget for the jar files. Worst case, fork the repo and remove the launch4j plugin from karamel-ui/pom.xml .
I understand what the problem is now. It's because launch4j plugin uses 32-bit binaries to build itself: http://sourceforge.net/p/launch4j/feature-requests/74/ I changed the pom.xml to put the launch4j plugin into the -Dwin profile. I updated the README.md to explain the convoluted way to build on Ubuntu.
Thanks, it works smoothly now!
I get the following error when running mvn package:
[ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.7:launch4j (l4j-clui) on project karamel-ui: Failed to build the executable; please verify your configuration. net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/hiway/.m2/repository/net/sf/launch4j/launch4j/3.8.0/launch4j-3.8.0-workdir-linux/bin/windres": error=2, No such file or directory -> [Help 1]