JPackage config only conains app.mainmodule and [JavaOptions]
Closed this issue · 7 comments
Hi,
I used to have a lot more information in my app.cfg
file:
[Application]
app.name=AppName
app.version=1.0.0
app.runtime=$ROOTDIR\runtime
app.identifier=
app.classpath=
app.mainmodule=...Launcher
But with the newest plugin and JDK 15 based jpackage I only get a single app.mainmodule
entry in the file.
Is there anything I can do to get the information(the version is most important) back to .cfg
file again?
P.S. When I call jpackage using comand line and pass arguments like --app-version 1.0.0
I do get this information written into the .cfg
file like app.version=1.0.0
, is there anything fundamentally different with the task itself?
Did you call the JDK15 jpackage when using the command line? Or the JDK14 jpackage? I get this information written in the .cfg
file only when using the JDK14 version.
It seems that the JDK15 jpackage no longer writes this information (see this change from June 2020). Instead, you should find the version in the JavaOptions
section (see this change from August 2020).
[JavaOptions]
java-options=-Djpackage.app-version=1.2.3
Thanks for the reply @siordache, you are right just double-checked, and apparently I was calling JDK14 based jpackage.
In the meantime, I created a Gradle task to manually write it in the file which works as a workaround.
I wonder why did they remove it though, I don't think it had anything to do with the issue. 🤔
It's strange I don't get that java-options=-Djpackage.app-version=1.2.3
written in the file either.
Does there need to be anything else than appVersion = ver
inside the jpackage
task to get it written into the config?
No, there shouldn't be anything else. If you run gradle with the -i
option, you can see the jpackage
commands generated by the plugin. Check if --app-version
is really there.
Yes it's there during jpackage command line call:
Maybe I should have mentioned this before, but there is another file being created inside /app
dir called .jpackage.xml
and this thing has both version and launcher name in it:
<?xml version="1.0" ?>
<jpackage-state version="15.0.2" platform="windows">
<app-version>2.9.0</app-version>
<main-launcher>App Name</main-launcher></jpackage-state>
I checked the output folder of a build it did a few weeks ago, using this plugin, and jpackage16 and the .cfg folder does contain:
[JavaOptions]
java-options=-Djpackage.app-version=4.0.0.0
Maybe this is a problem jpackage15?
I think the best thing to do is to ask on the core-libs-dev mail list if there is a reliable way to get the version information.