beryx / badass-jlink-plugin

Create a custom runtime image of your modular application
https://badass-jlink-plugin.beryx.org
Apache License 2.0
379 stars 25 forks source link

Feature to print out jlink and jpackage commands to the console #126

Closed SohamGovande closed 4 years ago

SohamGovande commented 4 years ago

It would be great if this gradle plugin allowed one to see which jlink and jpackage calls were being run under the hood, which is crucial for debugging purposes. For example, you could have a property called showDebugInfo, which (if true) would create a file called jlink-plugin-log.txt with the system calls to jlink and jpackage that are being made.

Thank you!

siordache commented 4 years ago

You can see the jlink and jpackage calls if you run gradle with the -i (or --info) flag. The lines containing these calls start with Starting process. Try for example:

./gradlew -i clean jpackage | grep 'Starting process'
SohamGovande commented 4 years ago

I will try this. Thank you!

SohamGovande commented 4 years ago

Yep, this is working.

Might I ask, is there a way to see the console output from the actual jpackage command?

siordache commented 4 years ago

With the -i flag, gradle also displays the output of the jpackage commands. However, jpackage doesn't print much by default. To see more, you can use the --verbose option:

jlink {
    ...
    jpackage {
        ...
        imageOptions += '--verbose'
        installerOptions += '--verbose'
    }
}
SohamGovande commented 4 years ago

Great - thanks.