jbang
jbang copied to clipboard
have way to not delete generated files during build fail?
take the code from #1596 and run jbang build
and have it fail and it will delete the generated files leaving you without ability to to figure out what caused the issues.
should we have an option of keeping cache around?
-Djbang.build.keepclasses=true
😉
doesn't seem to work though :/
jbang -Djbang.build.keepclasses=true --verbose --fresh --build-dir jbout src/main/java/App.java
...
[jbang] [1:428] Copying /Users/manderse/code/quarkusio/renotes/src/main/resources/templates/main.html to jbout/classes/templates
[jbang] [1:429] Deleting folder jbout/classes
[jbang] [1:431] Deleting folder jbout/generated
...
and jbout is empty.
JAVA_TOOL_OPTIONS=-Djbang.build.keepclasses=true jbang
works though...something broken/changed?
It might yes. I'm not sure, but thinking about it a bit I think we used to simply just copy all -D
args to System.properties, but now that builds are completely separate steps (with builds being able to trigger sub-builds etc) I most likely removed any code that would have secondary effects.
So either we change the code that checks for that flag to also look in the JBang command line, not only System.properties, or we specifically re-add code to copy the -D
flags that are passed on the command line to System.properties.
We definitely need to have -D available. And -Dquarkus.dev is honored so atm we are being inconsistent.
Best would be we used our own properties