beryx / badass-runtime-plugin

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

Fat jar breaks launch script #113

Closed satsen closed 3 weeks ago

satsen commented 2 years ago

By using the shadow plugin to create a fat jar, the launch script in the bin directory breaks. The application still works by running the embedded java runtime manually with the fat jar as the parameter, but the launch script just prints the output of the ./java command (with no arguments).

satsen commented 2 years ago

The relevant line (working)

shell script - result without shadow plugin: eval set -- $DEFAULT_JVM_OPTS $CDS_JVM_OPTS $JAVA_OPTS $MYPROGRAM_OPTS -classpath "\"$CLASSPATH\"" myprogram.MyProgram "$APP_ARGS"

batch script - result without shadow plugin: %JAVA_EXE% %DEFAULT_JVM_OPTS% %CDS_JVM_OPTS% %JAVA_OPTS% %MYPROGRAM_OPTS% -classpath %CLASSPATH% myprogram.MyProgram %CMD_LINE_ARGS%

When the shadow plugin is added, the myprogram.MyProgram is removed, which breaks it.

I think the badass-runtime-plugin was supposed to provide the fat jar as the argument but instead passed it to -classpath, so there is nothing to run. It just adds it to the classpath really. @siordache

To keep things simple and functioning, I don't see why the scripts with and without shadow should not be exactly the same.

satsen commented 5 months ago

@hakanai is this issue resolved? I have not used this plugin for a very long time and would like to close the issue.

satsen commented 3 weeks ago

I haven't used this plugin for a long time, I don't really care if it is solved or not