Creating OS X Application Bundles And Installers - excelsior-oss/excelsior-jet-maven-plugin GitHub Wiki
The plugin supports the creation of OS X application bundles and installers.
To create an OS X application bundle, add the following configuration
into the plugin <configuration>
section:
<packaging>osx-app-bundle</packaging>
Note: if you use the same pom.xml
for all three supported platforms (Windows, OS X, and Linux), it is recommended to use another configuration:
<packaging>native-bundle</packaging>
to create Excelsior Installer setups on Windows and Linux and an application bundle and installer on OS X.
To configure the OS X application bundle, you need to add the following configuration section:
<osxBundle>
</osxBundle>
The values of most bundle parameters are derived automatically from the other parameters of your pom.xml
.
The complete list of the parameters can be obtained
here.
You still need to tell the plugin where the OS X icon (.icns
file) for your bundle is located.
Do that using the <icon>
parameter of the <osxBundle>
section, or simply place the icon file at
${project.basedir}/src/main/jetresources/icon.icns
to let the plugin pick it up automatically.
By default, the plugin will create an OS X application bundle only,
but to distribute your application to your customers you probably need to sign it and package as an
OS X installer (.pkg
file).
The plugin enables you to do that using the following parameters within the <osxBundle>
section:
-
<developerId>
developer-identity-certificate
</developerId>
- "Developer ID Application" or "Mac App Distribution" certificate name for signing resulting OSX app bundle withcodesign
tool. -
<publisherId>
publisher-identity-certificate
</publisherId>
- "Developer ID Installer" or "Mac Installer Distribution" certificate name for signing the resulting OS X Installer Package (.pkg
file) with theproductbuild
tool.
If you do not want to expose above parameters via pom.xml
, you may pass them as system properties
to the mvn
command instead, using the arguments -Dosx.developer.id
and -Dosx.publisher.id
respectively.
Troubleshooting: If you would like to test the created installer file on the same OS X system on which
it was built, you need to first remove the OS X application bundle created by the plugin and located
next to the installer. Otherwise, the installer will overwrite that existing OS X application bundle
instead of installing the application into the Applications
folder.