News
0.52.0 (2020/10/16)
A few highlights in this release:
Easy local alias creation
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.
Alias lookup and Local catalogs
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.
Helping Tools
@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 with a README.md
jbang edit now includes a readme with some basic info to explain what the temporary project is all about.
version.txt in release artifacts
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.
Bug Fixes
- cleanup based on eclipse IDE findings (#e063d3fd)
- Default alias name when creating a new alias (#436) (#f4fa8c55)
- Jbang won't print extra newline when no output was generated (#412) (#765d8ccb)
- have random edit examples for jbang init (#ba22be2d, closes #310)
- add readme.md to edit (#bd7dd36c, closes #210)
- version.txt now generated as part of build and thus github release (#402c3bb4, closes #388)
Features
- Implement local catalog indices (#e740c0a2, closes #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)
Refactor
- Code refactor and now using
jbang-catalogs.json - Store implicit catalogs in a separate user config file