windows Maven 可以生成 exe 文件和 mac os x 应用程序吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/797209/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can Maven generate exe files and mac os x apps?
提问by willcodejavaforfood
Lets say you created a little Java Desktop app with a jar and some dependencies and possibly a license text file. I know there are plenty of Ant tasks that can generate installers, executables and proper Mac OS X applications including packaging them as ".dmg" files. Examples would be JarBundlerand Launch4j
假设您创建了一个带有 jar 和一些依赖项以及可能的许可证文本文件的小型 Java 桌面应用程序。我知道有很多 Ant 任务可以生成安装程序、可执行文件和适当的 Mac OS X 应用程序,包括将它们打包为“.dmg”文件。示例是JarBundler和Launch4j
Does similar things exist for Maven?
Maven 是否存在类似的东西?
Thanks
谢谢
采纳答案by dfa
回答by Cogsy
I also think launch4j has a maven plugin
我也认为launch4j有一个maven插件
回答by BrunoJCM
To generate a windows executable in a maven build, you can use the launch4j-maven-plugin. I just answered a related question, Trying to integrate Launch4j in a Maven project using Alakai plugin, showing how to accomplish that. It's very easy, more than JSmooth, which always had a maven plugin.
要在 maven 构建中生成 Windows 可执行文件,您可以使用 launch4j-maven-plugin。我刚刚回答了一个相关的问题,尝试使用 Alakai 插件将 Launch4j 集成到 Maven 项目中,展示了如何实现这一点。它非常容易,比 JSmooth 更容易,它总是有一个 maven 插件。
Hope it helps!
希望能帮助到你!