I’m creating an installable bundle for a JavaFX 8 application using the Oracle tool that comes with the JDK. On a Mac a .dmg
file is created and on Linux a .deb
file is used. I call an Ant script from Gradle to create the bundle. The problem that I have is that the version number contained in the bundle is always 1.0 and not the version that I specify. The relevant part of the Ant script is as follows:
<project name="VocabHunter Packaging" basedir=""
xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="jfxbundle" description="Build the application bundle">
<fx:deploy outdir="${basedir}/build"
nativeBundles="${packageType}">
<fx:application refId="VocabHunterId"
version="${version}"/>
<fx:bundleArgument arg="mac.CFBundleVersion"
value="${version}"/>
...
</fx:deploy>
...
</target>
...
</project>
You can see the full script in context here.
On a Mac, right-clicking the application icon and selecting “Get Info” shows 1.0 instead of the correct version number as you can see in the following screenshot:
Similarly, on Linux the version number shows as 1.0 during the installation of the .deb
file:
Does anyone know how to fix Ant script so that the correct version appears?
I'm using Oracle JDK 1.8.0_66 on both the Mac and on LInux.