Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for templates for JNLPBundler, and support for bundler parameters 'title' and 'description' #332

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

francesco-kriegel
Copy link

@francesco-kriegel francesco-kriegel commented Mar 23, 2018

This is the third attempt to get my pull request accepted and integrated, after #94 and #122 were declined, and a feature proposed in #122 was later integrated in #255.

The commit I am asking you to integrate allows for three further bundler parameters:

  • jnlpTemplates -- a list of HTML files to be processed as templates by JNLPBundler
  • title -- a title to be used by any supporting bundler, and which defaults to ${project.name}
  • description -- a description to be used by any supporting bundler, and which defaults to ${project.description}

Although @FibreFoX has integrated the option to specify <bundleArguments> and jnlp.templates is a StandardBundlerParam, cf. JNLPBundler, such a list of files cannot be parsed from the pom.xml, since a String converter is missing, see JNLPBundler. My solution to this works as follows.

  1. An optional list-valued field jnlpTemplates is defined in the NativeMojo.
  2. A user may add several <jnlpTemplate> entries (within <jnlpTemplates>) pointing to files to be used as templates by the JNLPBundler.
  3. When executing NativeMojo for the bundler jnlp, then this List<File> is converted into a Map<File,File>, see Lines 757-765, and the Map<File,File> is then added to paramsToBundleWith with key jnlp.templates.
  4. After a successful execution of the NativeMojo, the processed HTML files can be found in target/jfx/native.

In case one needs further control on where to output and store the processed HTML files, one could extend the field jnlpTemplates to allow for the declaration of pairs of input and output files. Currently, it is only a list of input files the names of which are used as names of the output files under target/jfx/native.

@FibreFoX
Copy link
Member

FibreFoX commented Apr 3, 2018

Indeed, the string-converter is missing. I think I haven't seen this the last time you proposed some change to this area.

To be honest I'm not sure how to deal with this, as starting with JDK11 the support for Java Web Start/JNLP is getting dropped (this is public on the dev-news). How do you think about this @francesco-kriegel ?

@francesco-kriegel
Copy link
Author

Hi

Sorry for the late reply. However, my answer is rather short: if support for Java Web Start is really about to be dropped soon, then it would probably not make too much sense to integrate this pull request. At least this holds true when always developing against the latest JDK. If one decides to stick to, say, JDK 8 for a while, since one gets dizzy due to the rapid version increments, then it could be beneficial for those developers to integrate this.

It is up to you to decide!

Ciao
Francesco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants