Tags: talios/jbang
Tags
<a name="0.46.1"></a> Quick fix (thanks to @grumpyf0x48) so `//SOURCES` work when called from outside the directory it is in. * resolve sources properly based on script location (#327647a9, closes jbangdev#325)
<a name="0.46.0"></a> Multiple source files are here! or at least an initial version. You can now in the main script file add `//SOURCES File1.java File2.java` to have `File1.java` and `File2.java` added to the sources being compiled. Note: this is experimental for now, see known limitations further down. This initial support for multiple files has some limitations that depedent on feedback will be lifted. 1. Main limitation is that all `//DEPS` and similar commands have to be in the main source file, the additonal source files does not affect the 'build'. 2. `jbang edit` probably have limits; right now probably will only work with all files in the same directory. 3. remote scripts (i.e. over `https`) does not support multiple source files yet. Do please try it out and let us know if it works and do please open issues and/or leave comments on the limits above - it encourages on fixing them and helps understand how it is used! The alias commands now will honor `jbang-catalog.json` files found in current and parent directories all the way to the root. This lets you have jbang aliases defined for your local project and also lets you edit `jbang-catalog` repositories using just `jbang` commands. i.e. here is how to setup your own `jbang-catalog`: ```shell $ mkdir jbang-catalog $ cd jbang-catalog $ jbang init hello.java $ jbang alias add -f jbang-catalog.json hey hello.java ``` Now `jbang hey` will run `hello.java` and you can use `git init` and push `jbang-catalog` to your favorite username or org on github, gitlab and gitbucket and `jbang hey@yourname` will now be possible to run your `hello.java` as long as they have `jbang` installed. @gastaldi contributed a Maven plugin allowing you to more easily use `jbang` from a maven build. See more at https://github.com/jbangdev/jbang-maven-plugin. `jbang edit` now supports using `--open=<editor>` no matter if you want to have live edit or not. This unfortunately meant we had to break `--live` behavior. `--live` is now a boolean toggle and thus where you previously did `jbang edit --live=<editor>` you now do `jbang edit --open=code --live`. The mechanism which allows using Quarkus now automatically generates main methods when needed and sets up needed java flags (such as logmanager) making the script files even smaller. Note: requires Quarkus 1.8.1+. * "javac not found" error (jbangdev#298) (#81126a3d, closes jbangdev#283) * Add missing backtick in catalog table (jbangdev#315) (#13a84983) * **templates:** escape path to not trigger qute (#2cfe03cb, closes jbangdev#317) * Add ability for integration classes to return JVM args and main classes (jbangdev#320) (#f1b02490) * Support for local/nearest catalogs (#722e9333, closes jbangdev#180) * save persistent args in jar for reuse (#5bde293e) * Initial support for multiple sources (jbangdev#323) (#fdf97ffe) * **edit:** add `--open=[editor] and make --live a boolean (jbangdev#314) (#9e872630) * **edit:** due to [9e87263](/commits/9e8726304878b7a66258817002e6a63ba6731519), --live=[editor] will no longer work. Use `--open=[editor] --live` instead.