jpackage --create-installer problem on Mac when installer-type is unspecified
lenborje at gmail.com
Mon Mar 11 08:40:08 UTC 2019
I'm experimenting with jpackage from the current EA available at https://jdk.java.net/jpackage/ <https://jdk.java.net/jpackage/>, for the moment on Mac only.
I have an existing application which I have previously deployed on multiple platforms using the then bundled javafxpackager.
With the current EA (build 17), I find I must specify the --installer-type parameter, otherwise I get the following error:
$ /Users/lennartb/Downloads/jdk-13.jdk/Contents/Home/bin/jpackage create-installer --overwrite --output /Users/lennartb/RaT/git/BMF/GUI/build/jpackage --name bmfgui --app-image /Users/lennartb/RaT/git/BMF/GUI/build/jpackage/BMFGraphicalUserInterface.app --icon BMF.icns --identifier com.cinnober.bmf.gui.Main --app-version 1.6.10 --verbose
jdk.jpackage.internal.PackagerException: Bundler Mac App Store Ready Bundler skipped because of a configuration problem: Mac App Store apps must be signed, and signing has been disabled by bundler configuration.
Advice to fix: Either unset 'signBundle' or set 'signBundle' to true.
Caused by: jdk.jpackage.internal.ConfigException: Mac App Store apps must be signed, and signing has been disabled by bundler configuration.
... 3 more
With the previous javafxpackager this wasn't needed. Javafxpackager always tried to create all installer types and ignored all errors from any specific bundler, e.g. on linux it always tried to create both a Debian package and an rpm and just ignored if any of the requisite builder tools was unavailable.
The obvious workaround in my case is to run jpackage twice, once with "--installer-type pkg" and once with "--installer-type dmg", but since I'm furthered hampered by limitations of my toolchain (gradle + badass-jlink-plugin) it would really simplify matters it jpackage could be restored to the javafxpackager behaviour when "--installer-type" is unspecified, e.g. ignore errors and create whatever installers it can.
More information about the core-libs-dev