执行失败错误-launch4j Maven 插件
Exec failed error - launch4j Maven plugin
我正在尝试使用 Maven 构建一个 exe,并且我使用 Maven 中的 launch4j 插件遵循了本指南。
http://www.hascode.com/2012/08/creating-a-windows-executable-from-a-jar-using-maven/
进行全新安装后,
我得到这个错误
net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Builder.build(Builder.java:144)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:353)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
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 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: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Util.exec(Util.java:148)
at net.sf.launch4j.Cmd.exec(Builder.java:205)
at net.sf.launch4j.Builder.build(Builder.java:97)
有什么解决办法吗?
问题是 src/main/resources 中的图标。这是一个损坏的 .ico 文件
我正在尝试使用 Maven 构建一个 exe,并且我使用 Maven 中的 launch4j 插件遵循了本指南。
http://www.hascode.com/2012/08/creating-a-windows-executable-from-a-jar-using-maven/
进行全新安装后, 我得到这个错误
net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Builder.build(Builder.java:144)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:353)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
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 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: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Util.exec(Util.java:148)
at net.sf.launch4j.Cmd.exec(Builder.java:205)
at net.sf.launch4j.Builder.build(Builder.java:97)
有什么解决办法吗?
问题是 src/main/resources 中的图标。这是一个损坏的 .ico 文件