bach

bach - Java Shell Builder

jdk11 travis experimental

Use Java source in jshell to build your modular project.

No need to be a maven to be able to use a build tool - forax/pro

Fast-forward to install-jdk.sh section.

Bootstrap

jshell https://bit.ly/boot-bach
bach <ACTION...>

With ACTION:

 build     -> Build project in base directory.
 clean     -> Delete all generated assets - but keep caches intact.
 erase     -> Delete all generated assets - and also delete caches.
 fail      -> Set exit code to an non-zero value to fail the run.
 help      -> Display help screen ... F1, F1, F1!
 scaffold  -> Create a starter project in current directory.
 tool      -> Execute named tool consuming all remaining actions as arguments.

Directory Layout

Project with one more more modules.

demo
  + src
    + com.greetings
    + org.astro
    + ...

Project with one more more modules and test modules.

demo
  + src
    + com.greetings
    + org.astro
    + ...
  + test
    + com.greetings
    + org.astro
    + ...
    + integration
    + ...

install-jdk.sh

install-jdk.sh main purpose is to install the latest-and-greatest available OpenJDK release from jdk.java.net. It supports GA releases and builds provided by Oracle as well.

Options of install-jdk.sh

-h|--help                 Displays this help
-d|--dry-run              Activates dry-run mode
-s|--silent               Displays no output
-e|--emit-java-home       Print value of "JAVA_HOME" to stdout (ignores silent mode)
-v|--verbose              Displays verbose output

-f|--feature 9|10|...|ea  JDK feature release number, defaults to "ea"
-l|--license GPL|BCL      License defaults to "GPL"
-o|--os linux-x64|osx-x64 Operating system identifier (works best with GPL license)
-u|--url "https://..."    Use custom JDK archive (provided as .tar.gz file)
-w|--workspace PATH       Working directory defaults to user's ${HOME}
-t|--target PATH          Target directory, defaults to first component of the tarball
-c|--cacerts              Link system CA certificates (currently only Debian/Ubuntu is supported)

How to set JAVA_HOME with install-jdk.sh

be free - have fun

jsb