8000 Tags · talios/jbang · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: talios/jbang

Tags

v0.52.1

Toggle v0.52.1's commit message
<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)

v0.52.0

Toggle v0.52.0's commit message
<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

v0.51.1

Toggle v0.51.1's commit message
<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)

v0.51.0

Toggle v0.51.0's commit message
<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)

v0.50.1

Toggle v0.50.1's commit message
<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]

v0.50.0

Toggle v0.50.0's commit message
<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)

v0.49.0

Toggle v0.49.0's commit message
<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

v0.48.0

Toggle v0.48.0's commit message
<a name="0.48.0"></a>

* Added `--quiet` option that will silence any build info and default messages for those who want the cleanest output.
* `edit` now works with shells and OS shortcuts, i.e. `code` now will work on windows where before you had to use `code.cmd`, Thus i.e. `jbang edit --open=code xyz.java` works the same on all main platforms.
* You can now run `jdk java-env` to get environment pointing to cached JDK by jbang.
* Improved jdk list command by first time code abd docs contributor @abelsromero

* `//usr/bin/env jbang` not working on Windows (#526d70c3, closes jbangdev#341)
* Improved `--quiet` option (#8e7bf13c)
* os.detected.jfxname now properly resolved (#dea58992, closes jbangdev#353)

* Added `--quiet` option (#802e7543)
* edit now uses cmd.exe / sh -c to launch editor (#09790789)
* Added `jdk default`, `jdk home` and `jdk java-env` commands (#aabc9077)
* improves jdk command output messages (#868b7397, closes jbangdev#347)

* Turned sym/hard link creation code into utility function
* Now using special exit code to allow printing to stdout

v0.47.1

Toggle v0.47.1's commit message
<a name="0.47.1"></a>

* **sdkman:** broadcast api changed. [patch] (#c7148078)

v0.47.0

Toggle v0.47.0's commit message
<a name="0.47.0"></a>

Main new feature is that multiple source `//SOURCES` now work for http/https hosted scripts too.

We added a `JBANG_DEFAULT_JAVA_VERSION` env variable you can use in the cases where you don't want jbang to download java 11 to just realize your script has a `//JAVA 14+` in it.

And then the very important feature of fixing it so you can run Quarkus in a tweet:

```shell
 jbang https://twitter.com/maxandersen/status/1307832761164664834
 ```

* **twitter:** recognize public class as .java even if no main (#88f8ba9c)
* `jdk uninstall` now firsts checks if JDK exists (jbangdev#330) (#31445dc1)
* made downloading more robust (jbangdev#329) (#ee3bc241)
* Fixed requesting open-ended Java versions (#28eb2e8f)
* made downloading more robust (jbangdev#329) (#150e8247)

* Added `JBANG_DEFAULT_JAVA_VERSION` (#ce85c774)
* add support for multiple source files via https (#b41dfd22, closes jbangdev#328)
0