2

I want to add a simple click-through license to an exe-installer I create with the javafx-maven-plugin (version 8.1.3) which itself uses Inno Setup.

From what I understand from the Oracle documentation this can only be done with Inno Setup, not with MSI – which would be fine as well. In the Ant Task it seems one has to use a <fx:fileset> with type license:

Resources of type license are used as a source of content for a click-through license or a license embedded into the package.

Now I know that the icon for the application has to be placed in the folder src/main/deploy/windows/. But is this also the folder where I have to place the license file? Will it be picked up automatically? And does it have to follow a specific naming convention ("license.rtf" for instance)?

philonous
  • 3,621
  • 3
  • 27
  • 24
  • 1
    Hi, I'm the maintainer of that javafx-maven-plugin, maybe that question would belong to the project ;) I will check this question and might come up with a new example-project. – FibreFoX Apr 29 '16 at 07:26

1 Answers1

3

Disclaimer: I'm the maintainer of the javafx-maven-plugin.

I've modified some small dummy-project of mine and came up with the following solution:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.4.0</version>
    <configuration>
        <mainClass>your.path.to.the.mainclass</mainClass>
        <verbose>true</verbose>
        <bundleArguments>
            <licenseFile>someFileThatIsTheLicense.rtf</licenseFile>
        </bundleArguments>
        <additionalAppResources>src/main/additionalAppResources</additionalAppResources><!-- name does not matter, it's just some folder :D -->
    </configuration>
</plugin>

The special thing is the new <additionalAppResources>-property I added to the plugin, this makes it possible to add stuff to the generated native app including all created installers. As the license-file is some special thing for installers, it is set via some <bundleArguments> inside your plugin-configuration.

Just set <licenseFile> to the name of your license, but be aware: the FILENAME itself does not matter (no auto-detection stuff here), but it matters case-sensitivity AND i suggest to NOT put that file in some subfolder, because the license-file-detection is a bit flawed here inside the packagers themselves!

It works for MSI- and for EXE-installer on Windows, and for Mac and Linux too ;)

Oh, and you can update to the latest javafx-maven-plugin version too :D

FibreFoX
  • 2,858
  • 1
  • 19
  • 41
  • Thank you very much for your answer! I will try it out as soon as I can and I will accept your answer if I get it working ;) Also I will upgrade to the latest version. Thanks again! :) – philonous Apr 29 '16 at 09:26