Tags: vorburger/jbang
Tags
Quick fix to have `jbang <url-to-jar>` working. This lets you run [joinery](https://bintray.com/cardillo/maven/joinery/1.9) which does not publish a proper jar in a maven repository, but does have a .jar posted at an url. Thus todays bugfix lets you do: ```shell jbang https://bintray.com/cardillo/maven/download_file?file_path=joinery%2Fjoinery-dataframe%2F1.9%2Fjoinery-dataframe-1.9-jar-with-dependencies.jar shell > df = new DataFrame() [empty data frame] > df.add("value") [empty data frame] > [10, 20, 30].forEach(function(val) { df.append([val]) }) > df value 0 10 1 20 2 30 ``` * run jar from a https url (#890787f8, closes jbangdev#490)
<a name="0.53.1"></a> Bug fixes, with one notable change/fix that `jbang catalog` and `jbang alias` commands support catalogs located in any default branch whether named `master`, `main` or something else. It will now look for `HEAD` which points to the latest commit on the default branch. * aliases no longer look for master, asks for HEAD instead (#0a93f0c1, closes jbangdev#485) * original source must be what's in ScriptResource.originalSource (jbangdev#488) (#3885a0a8) * it must allow same //SOURCES in different paths (jbangdev#489) (#6337d26f)
<a name="0.53.0"></a> Lots of fixes, but also some nice features! `//SOURCES` will now recursively include `//SOURCES` and `//DEPS` allowing for better reuse/componentization for multi source scripts/apps. Yes, multiple source is supported in JBang - it actually been for a while as javac will automatically include reference classes available relative to a file. When we realized that worked we enabled `jbang edit` to work with multiple files including proper package handling and now `//SOURCES` support file patterns, i.e. `//SOURCES model/**/*.java` to include all java files found under `model`. Furthermore you can now even use URL's in `//SOURCES`, like `//SOURCES https://gist.github.com/tivrfoa/bb5deb269de39eb8fca9636dd3c9f123#file-gsonhelper-java`. And that last example shows the last major feature you can now refer to individual files via a anchor in a gist url. Big parts of these were contributed by [@tivrfor](https://github.com/tivrfoa) as his first contributions! Thank you. * search //SOURCES and //DEPS in multiple files (#169e67c4) * support nested multiple sources and gist with specific filenames (#924e2963) * better check for String contains main method (jbangdev#468) (#87ff6813) * update base path when resolving //SOURCES (jbangdev#477) (#2c372185) * jbang cache clear --deps (#be3c2b37, closes jbangdev#475) * fail if class name for is not valid java (#ecc1b19d, closes jbangdev#460) * **jbangdev#274:** brew install now should work out of the box since no longer keg_only (#e5f85afc)
<a name="0.53.0"></a> A few bug fixes and "feature" making it so jbang can now run/install java vm's on Raspberry Pi 3 and possibly earlier versions. * **jbangdev#459:** aliased GAV now resolving correctly (#8e74b5ae) * allow MSYS2 to pass OS check in jbang script (#66dccf4a) * Added support downloading JDK if not found on Raspberry Pi (jbangdev#457) (#72959205)
<a name="0.52.0"></a> A few highlights in this release: Starting with first contribution from @chrsblck in form of enabling `jbang alias add -f . myalias path/to/some.java` making it so users don't need to remember the full default `jbang-catalog.json` name. Then we get big improvements for the alias and catalog mechanism. Now you can setup a set of aliases and catalogs for your project, commit the `jbang-catalog.json` and have `jbang` work uniformly from any contributor or user inside your project. This is made possible by alias lookups now will look in all added catalogs - meaning instead of having to do: `jbang gavsearch@jbangdev` you can simply add `@jbangdev` as a catalog, ie. `jbang catalog add jbdev jbangdev` and now you can just go: `jbang gavsearch` And it will automatically resolve this to `gavsearch@jbangdev`. For this to work for your "local" project make sure you have used `jbang catalog add -f .` or `jbang alias add -f .` so you get a `jbang-catalog.json` in the root of the project you want to add jbang aliases/catalogs to. @fbricon started exploring adding jbang support to Eclipse and VSCode thus to help him (and others?) we've added a `jbang info` command which can be used to get technical info relevant for tooling. Example: ``` jbang info tools githubinfo.java [jbang] Resolving dependencies... [jbang] Resolving org.kohsuke:github-api:1.101...Done [jbang] Dependencies resolved { "originalResource": "githubinfo.java", "backingResource": "githubinfo.java", "resolvedDependencies": [ "/Users/max/.m2/repository/org/kohsuke/github-api/1.101/github-api-1.101.jar", "/Users/max/.m2/repository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9.jar", "/Users/max/.m2/repository/commons-codec/commons-codec/1.13/commons-codec-1.13.jar", "/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar", "/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar", "/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar", "/Users/max/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar" ] } ``` The exact format and contents of this output is still very experimental - so don't rely too much on it just yet. Feedback very welcome! jbang edit now includes a readme with some basic info to explain what the temporary project is all about. There is now a `version.txt` in the released artifacts that tools and install scripts can rely on to easily check if they have the latest jbang release. Full list of fixes listed below. * cleanup based on eclipse IDE findings (#e063d3fd) * Default alias name when creating a new alias (jbangdev#436) (#f4fa8c55) * Jbang won't print extra newline when no output was generated (jbangdev#412) (#765d8ccb) * have random edit examples for jbang init (#ba22be2d, closes jbangdev#310) * add readme.md to edit (#bd7dd36c, closes jbangdev#210) * version.txt now generated as part of build and thus github release (#402c3bb4, closes jbangdev#388) * Implement local catalog indices (#e740c0a2, closes jbangdev#406) * Unqualified aliases are now also looked up in local catalogs (#44d15990) * Added ability to explicitly add implicit catalogs (#e0af545d) * initial info command for tools (#702dfd89) * Code refactor and now using `jbang-catalogs.json` * Store implicit catalogs in a separate user config file
<a name="0.52.0"></a> Bug fixes to have issue in some commands when using PowerShell on Windows and stop launching editor in "interactive" mode so Ctrl+C will still work on Fedora and possibly other Linux installs. * **bug:** Remove interactive flag from sh (#a5de3b78, closes jbangdev#407) * Windows testing broken (#379c3be1) * add viewics.java to render ics files in jfx agenda (#1f19ccbe)
<a name="0.51.0"></a> A few fixes/features with some dependabot clanup of dependencies. First of, running jars no longer uses `-jar`, but we just introspect for the main class in manifest and use that by default in a normal java launch with a classpath. This is done since `java -jar` will ignore any jar's provided by `--classpath` flags which means if your `.jar` had any external dependencies not explicitly listed in its manifest.mf it would fail to run - something very few if any jars available as Maven artifacts has. Second, to work more smoothly with [Intellij](https://blog.jetbrains.com/idea/2020/10/shebang-mechanism-support-in-intellij-idea-2020-3/) new shebang support which makes a file starting with `#!` and `///` easy from the IDE, `jbang` will now treat `xyz.sh` as if it is `xyz.java`. This works okey, but I hope Intellij will make their integration smarter so users don't need to use `#!` or `.sh` named files. * stop using -jar for jar runs. (#8a773825) * support files named xyz.sh to work more seamless with Intelljs shebang support (#c7386642)
<a name="0.50.1"></a> Just a bugfix release, mainly fixing a issue in zero install for powershell and adding javaagent dependencies to boot-class-path so you can use 3rd party tools in your agent (like javassist). * We now properly notify Jbang we're running in PowerShell (#bf629dbd, closes jbangdev#401) * fix outdate docs about --live=idea that is not --live --open=idea (#2442beaf, closes jbangdev#405) * add DEPS for JAVAAGENT to boot-class-path in manifest.mf (#d13fde27) * Jbang zero-install is now located in `~/.jbang/bin` [patch]
<a name="0.50.0"></a> One great feature: "Zero" Install run of jbang scripts. Linux/OSX/Windows Bash: `curl -Ls https://sh.jbang.dev | bash -s - <args>` Windows Powershell: `iex "& { $(iwr https://ps.jbang.dev) } <args>"` This will install jbang (and java if needed) in local ~/.jbang folder and let you run jbang from anywhere. * Now able to use Jbang while only having the script itself (#1e5ae220, closes jbangdev#219) * Added PowerShell script with zero install (#8c26d75e) * temporary dir now properly set in jbang.ps1 (#47d6d9d1)
<a name="0.49.0"></a> First, thanks to @rsvoboda for adding ansi coloring to alias lists! Second, Agents are coming! jbang now lets you write and run with javaagents. Create an agent: `jbang init -t agent myagent.java` Use the agent: `jbang --javaagent=myagent.java yourapp.java` This of course also works with jbang alises, http & maven artifact support; thus you can do the following to run your app with the Byteman agent: `jbang --javaagent=org.jboss.byteman:byteman:4.0.13=script:test.btm yourapp.java` Means you can prototype and test and agent very easily, but also distribute it easily by just make it available via http or as maven artifact. Note: for now the agents can not have 3rd party dependencies. Will come in future update. * jbang alias now again works with GAV refs (#41d3cf3e, closes jbangdev#375) * add ansi coloring to alias list (#1e761622) * support writing and using java agents (#9cb7d66c) * minor code simplifications
PreviousNext