java如何从IntelliJmaven项目为OSX生成dmg文件?
我是IntellijMaven java编程新手,我想通过我的程序为MacOS制作dmg文件
我的开发环境是Ubuntu IntelliJ Java Maven。当我搜索时,有一些插件能够从intelliJ生成dmg文件,但实际上对我来说非常复杂
你能告诉我这个过程的顺序吗? 提前谢谢
此外,当我从https://github.com/federkasten/appbundle-maven-plugin运行mvn install
和appbundle-maven-plugin
时,以下消息来自命令。
如果我做了傻事,你能告诉我哪一部分比较尴尬吗
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.623 s
[INFO] Finished at: 2017-04-26T14:16:36+09:00
[INFO] Final Memory: 12M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal sh.tak.appbundler:appbundle-maven-
plugin:1.2.0:bundle (default) on project qupath: Execution default of goal sh.tak.appbundler:appbundle-maven-plugin:1.2.0:bundle failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
这是我的maven插件代码
<plugin>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<mainClass>src.main.java.qupath.QuPath</mainClass>
<jrePath>/usr/lib/jvm/java-8-oracle/jre</jrePath>
<generateDiskImageFile>true</generateDiskImageFile>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
# 1 楼答案
按照本教程http://centerkey.com/mac/java使用Java packager https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html