Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
MIT License
Bot releases are visible (Hide)
Published by maxandersen about 3 years ago
Release that enables specifying java version and main method + java options when setting up aliases. Useful when you cannot change the jar or source code the alias refer to, i.e. jbang alias add --java 16 <urltojar>
You can now refer to {scriptref}
in templates to know what file name user pointed to when running jbang init
.
Also piping script to a jbang
is now a bit smarter - it will try and find a main class so cat main.java | jbang -
will just work; and otherwise it will assume the input is jshell
style code. If you want to force jshell behavior you can activate that with --jsh
, ie. cat main.java | jbang --jsh -
java
and main
options to aliases (#979)build
now has --catalog
option too (#977)We'd like to thank the following people for their contributions:
Tako Schotanus, Max Rydahl Andersen, GitHub
Published by maxandersen about 3 years ago
We'd like to thank the following people for their contributions:
Tako Schotanus, Max Rydahl Andersen, GitHub
Published by maxandersen over 3 years ago
Special edition release jumping a few version numbers by accident :)
Big thing in this release is you can now refer to properties when using jbang init
, i.e jbang init -Dkey=value mytemplate@acmeio
and
jbang will now honour maven.local.repo
system property if present.
And thanks to @aalmiray JBang is now released using jreleaser.org.
Max Rydahl Andersen, Andres Almiray
Published by github-actions[bot] over 3 years ago
A good set of bugfixes was piling up thus time to release!
Also check out updated documentation at https://jbang.dev/documentation
Published by github-actions[bot] over 3 years ago
Note: if you use brew
for updating jbang
you might need to run brew tap --repair
due to default branch renamed from master
to main
.
@evanchooly dropped by and contributed initial experimental Kotlin support. Yes, you can now use Kotlin in addition to plain Java with jbang
; you can for example write a Quarkus microservice in Kotlin like this: `
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.quarkus:quarkus-bom:${quarkus.version:1.11.0.Final}@pom
//DEPS io.quarkus:quarkus-resteasy
import javax.ws.rs.*
import javax.ws.rs.core.MediaType
@Path("/greeting")
class GreetingResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
fun hello() = "hello"
}
Note, the Kotlin support is experimental with the intent to let everyone and try it out and give feedback and we see where it should go.com.
Things that works now:
jbang init -t hello.kt hello
creates a basic kotlin file.jbang xyz.kt
should "just work"Things not yet implemented/tested (open issues if you need/want these):
jbang edit
is not aware of kotlin
.java
and .kotlin
not tested (if main file is .kt
it should work).main.kts
nor kscripts .kts
) are not supportedjbang will now download Java 16 builds for Alpine Linux to avoid just falling over.
jbang info tools
have more information than before allowing tools like the experimental JBang Eclipse integration to work.
Finally some bug fixes and started move from master
to main
on repositories.
jdk home
output won't print "echo" anymore (#841) (#617546d2)eval
in app scripts (#855) (#4add8362)info tools
now returns a lot more information (#859) (#e03d6d96, closes #833)Published by github-actions[bot] over 3 years ago
Release that fixes error in jbang.cmd on Windows, and improves quoting for arguments
and now jbang edit
will include //FILES
in the IDE project making it easier to
edit multi-file jbang apps.
Published by github-actions[bot] over 3 years ago
Whoopsie - we had a regression where --java
and //JAVA
not being consistently applied.
Now fixed - please update :)
Published by github-actions[bot] over 3 years ago
jbang export
now has a sub-command to export your jbang script/app to
a maven repo.
This allows jbang scripts/apps to be used like any other maven dependencies by
i.e. classic maven and gradle projects.
For it to work you need to publish the repo using tools that understand maven repositories.
One such tool is https://jitpack.io which provides a build service that exposes github,
gitlag, etc. git repositories as maven repositories.
To get jitpack to understand jbang projects you need to put a jitpack.yml
in the root of the project
with content like this:
before_install:
- curl -Ls https://sh.jbang.dev | bash -s - app setup
install:
- ~/.jbang/bin/jbang export mavenrepo --force -O target -Dgroup=$GROUP -Dartifact=$ARTIFACT -Dversion=$VERSION hello.java
- mkdir -p ~/.m2/repository
- cp -rv target/* ~/.m2/repository/
This should enable some interesting usecases for jbang script and applications :)
Since jbang export
now have subcommands, instead of flags you will need to use jbang export local
instead of jbang export
from past versions of jbang
.
Published by github-actions[bot] over 3 years ago
Main event for this release are templates are now thanks to @quintesse not limited to be bundled in jbang.
Until now we had jbang -t cli hello.java
to create java file using the pre-bundled cli
template.
Templates can now be added to jbang-catalogs both locally or in a remote location.
Allow projects that want to get a head-start and make it easy to try out their api can add templates to their jbang-catalog so users can do things like:
jbang init -t helloworld@maxandersen hello.java
This will use the helloworld
template configured in jbang-catalog.json
in https://github.com/maxandersen/jbang-catalog.
You can read the details on how you can make your own templates for your project in the jbang readme.
If you do let us know on @jbangdev twitter!
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Just a quick fix as @jeffmaury pointed out that there was a regression that prevented you
to use http git urls as a dependency anymore. i.e. //DEPS https://github.com/jgwest/zenhub-api-java-client
no
longer resolved properly. That is now fixed.
Published by github-actions[bot] over 3 years ago
Main new feature is jbang now runs cleanly on IBM AIX, Linux/ppc64le and Linux/390x thanks
to @sxa's first contribution.
Otherwise bugfixes in area of proper quote handling, symbolic links and cleanup. See details below.
app setup
(#736) (#1f2e30d2)Published by github-actions[bot] over 3 years ago
No tag description found for unspecified# 0.66.1 (2021/02/15)
Bug fix for case where //JAVA <version>
was only honored on the first run. Now fixed.
Published by github-actions[bot] over 3 years ago
In this release we say bye-bye to jcenter and welcome to version check and enforced --offline
mode.
jfrog announced they are shutting down their maven repository known as jcenter. jcenter was the default maven repository for jbang which is now changed to be maven central.
Thus if you have a jbang app that relied on dependencies found only in jcenter you will need to add jcenter repository using //REPOS
.
Example:
//REPOS jcenter
Note: if you still want maven central used when using jcenter then you need to list both:
//REPOS mavencentral,jcenter
jbang
will now asynchronously check at a regular interval if a newer version is available and provide instruction on how to update. If you do not want the version check you can set JBANG_NO_VERSION_CHECK
environment variable.
--offline
now fully honored and enforcedoffline mode was only fully honored by the dependency resolver. Now it is enforced for fetching scripts, catalogs, version check etc. Meaning --offline
truly is offline and if jbang
needs to go online it will
now fail where it before would let the request go through.
--fresh
Using jbang --fresh env@jbangdev
and the @jbangdev
catalog already had been fetched it would not use the latest versions despite the --fresh
flag. Now catalogs will be downloaded if there are changes when using --fresh
.
--offline
flag is now toplevel and works in more cases (#d88da9b2)--check
and --update
options to jbang version
(#15fcfa9e)Published by github-actions[bot] over 3 years ago
Fix to handle multi file content-disposition found on bitbucket servers.
Published by github-actions[bot] over 3 years ago
Small bug fix where the generated jars include dependencies that should have been overridable with --deps
and --cp
.
Published by github-actions[bot] over 3 years ago
A cleanup release with a few minor but important fixes.
jbang will now trigger a rebuild if dependencies (i.e. SNAPSHOTS) have changed their last modified timestamp.
Makes it easier to use jbang to run the same unchanged script against actual changed dependencies without having to clear the cache manually.
info
and edit
now take --deps
and --cp
into consideration.
And bug fixed that caused problems for servers (like a private bitbucket server) when downloading raw git urls.
Also Big internal cleanup release - code is now much cleaner; will make it easier to
add features and fix bugs :)
--deps
and --cp
now available on info
and edit
(#695) (#d6654e77)Published by github-actions[bot] over 3 years ago
Small improvements but they all count :)
Visual Studio code will now automatically download java sources and documentation when needed (i.e. on hover)
and the VSCodium will be installed with java dependency extension to give better java project navigation.
Quarkus templates upgraded to use bom pom feature recently introduced. Thus jbang init -t qcli cli.java
will not
init file with a Quarkus platform and no need to explicit list versions for Quarkus extensions.
Published by github-actions[bot] almost 4 years ago
I'm extremely happy to say that with this release jbang now support bom poms allowing you to do things like:
//DEPS io.quarkus:quarkus-bom:1.11.0.Final@pom
//DEPS io.quarkus:quarkus-resteasy
//DEPS io.quarkus:quarkus-smallrye-openapi
//DEPS io.quarkus:quarkus-swagger-ui
or
//DEPS com.microsoft.azure:azure-bom:1.0.0.M1@pom
//DEPS com.microsoft.azure:azure
Notice how first line are importing boms with @pom
classifier. When jbang see these it will load that bom pom ` section to use as fallback when when resolving version less artifacts.
This removes a lot of redundancy and replaces it with just one line for the BOM POM.
Finally also added run/test/
visual code extension to the default vscodium install using jbang edit --open myapp.java`