On Thu, 2022-04-07 at 19:53 -0400, Alexey Semenyuk wrote:

>
> I can see two separate issues with jpackage:
  1. jpackage reports NPE if it can't figure out the package name
> from
> the supplied application image. It should issue a helpful error
> message
> instead
>   2. jpackage fails to populate application image with Java runtime
> and
> app specific files when executed in Github but exits with "0" status
> indicating no error
>

I totally agree these are two separate issues.

>
> The major problem in your use case is that jpackage doesn't create
> correct application image. Instead, it creates only a directory
> structure of application image, but no files and exits with a
> "success"
> status code. This is quite strange. Is there any chance Gradle
> ignores
> non-zero exit code from jpackage execution? Can you directly run
> jpackage command creating application image in the environment where
> it
> outputs "empty" application image and check its exit code (please
> add
> "--verbose" to jpackage command line to get debug output)?
>
> - Alexey
>

Now this is somewhat puzzling for me:
I tried to factor out Gradle by putting the JPackage commands into a
separate section of the Github Actions script. So now it is invoked
through bash.

No wonder, the command triggered by Gradle and the one triggered by
bash revealed the same result: A lot of files were missing. I verified
this by listing the directories through a 'find'.

But then I followed your advice and added --verbose to the JPackage
command. And find lists a lot more files now.

In case you are interested, check out
https://github.com/HiranChaudhuri/settlers-installer/runs/5890636608?check_suite_focus=true

So now I believe that --verbose does not only change log output but
also impacts app-image creation. BTW, the command used is

jpackage --verbose --type app-image --dest app/build/app-image -i
app/build/jpackage_input/app-0.1.0-SNAPSHOT/lib --main-jar app-0.1.0-
SNAPSHOT.jar --main-class settlers.installer.App --name SettlersRemake
--app-version 0.1.0-SNAPSHOT --description 'Settlers 3 remake - see
https://github.com/' --vendor Hiran, --icon
app/build/resources/main/siedler3-helme-logo.png --resource-dir
app/build/resources/jpackage

Hiran

Reply via email to