sormuras / bach Goto Github PK
View Code? Open in Web Editor NEW🎼 Bach Builds (on(ly)) Modules
Home Page: https://bach.run
License: Universal Permissive License v1.0
🎼 Bach Builds (on(ly)) Modules
Home Page: https://bach.run
License: Universal Permissive License v1.0
Thanks for your nice tool! Currently trying it out a bit.
It looks although curl should download silently it stills logs heavily:
Saving to: ‘jdk-10_linux-x64_bin.tar.gz’
0K .......... .......... .......... .......... .......... 0% 46.1M 7s
50K .......... .......... .......... .......... .......... 0% 33.9M 9s
100K .......... .......... .......... .......... .......... 0% 37.6M 9s
150K .......... .......... .......... .......... .......... 0% 109M 7s
It seems that a certificate error occurs and we can not download it using install-jdk.sh
.
See https://travis-ci.org/mybatis/thymeleaf-scripting/jobs/525200361 .
Probably exit code '51' is SSL connection error of cURL. (https://curl.haxx.se/docs/manpage.html#51)
NET::ERR_CERT_COMMON_NAME_INVALID
for all download.java.net
assetsinstall-jdk.sh
to use https://download.oracle.com/java
as the url prefix for OpenJDK assets[...] we don't have an Oracle JDK 12 EA because it's literally the same as our OpenJDK builds, so we likely won't have Oracle JDK ea builds any more now, just GPL ones.
https://twitter.com/DonaldOJDK/status/1032638250899390465?s=20
How do you unpack/install .dmg
archives on macOS within a shell script?
Jar more standard artifacts.
It seems you are not passing the right parameters when asking for a binary image using the AdoptOpenJDK API.
see https://travis-ci.org/forax/pro/jobs/552956389 for a failed job
the request that failed:
https://api.adoptopenjdk.net/v2/binary/releases/openjdk11?type=jdk&os=osx&arch=mac&release=latest&heap_size=normal&openjdk_impl=hotspotthe equivalent request that works:
https://api.adoptopenjdk.net/v2/binary/releases/openjdk11?openjdk_impl=hotspot&os=mac&arch=x64&release=latest&heap_size=normal&type=jdkThe os is "mac" and not "osx" and the architecture is "x64" and not "mac",
see the query parameters described by the API v2 doc
Implement tool options with
Work-around: use Bach#execute
bach.execute(
Bach.Command.of("jar")
.add("-c")
.add("--file").add("target/org.codefx.demo.advent.jar")
.add("--main-class").add("org.codefx.demo.advent.Main")
.add("-C").add(bach.path(Folder.TARGET_MAIN_COMPILED)).add(".")
);
There are usually some days when there's whether an "Early Access" nor a "Release Candidate" build available at http://jdk.java.net -- which will cause install-jdk.sh
to fail when "--feature=ea" is set.
Hello,
I hope that this is not a duplicate issue - I browsed the closed one's and it seems like they were resolved. I am getting a download failure with the following Travis CI matrix config:
- os: osx
osx_image: xcode9.4
jdk: oraclejdk10
This leads to the following error:
$ export JAVA_HOME=${TRAVIS_HOME}/oraclejdk10
$ bash install-jdk.sh -F 10 -L BCL --target $JAVA_HOME --workspace ${TRAVIS_HOME}/.cache/install-jdk
install-jdk.sh 2018-08-16
Variables:
feature = 10
license = BCL
os = osx-x64
url = http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_osx-x64_bin.tar.gz
status = 302
archive = /Users/travis/.cache/install-jdk/jdk-10.0.2_osx-x64_bin.tar.gz
Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_osx-x64_bin.tar.gz...
The command "bash install-jdk.sh -F 10 -L BCL --target $JAVA_HOME --workspace ${TRAVIS_HOME}/.cache/install-jdk" failed and exited with 8 during .
You can see the failed build here:
https://travis-ci.org/TestFX/TestFX/jobs/428810403
Thanks very much for your work on this script, it has made installing various JDKs much nicer on Travis. Also I know that you are not responsible for it working on Travis, so maybe it would be more appropriate for me to open this issue on their issue tracker. If that's the case please feel free to let me know and close this. Thanks again.
Looks like openjdk 12 just changed their download url scheme. I had been running against the release candidate just fine and the GA release today came out at:
https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz.sha256
https://download.java.net/java/GA/jdk12/GPL/openjdk-12_osx-x64_bin.tar.gz
https://download.java.net/java/GA/jdk12/GPL/openjdk-12_osx-x64_bin.tar.gz.sha256
https://download.java.net/java/GA/jdk12/GPL/openjdk-12_windows-x64_bin.zip
https://download.java.net/java/GA/jdk12/GPL/openjdk-12_windows-x64_bin.zip.sha256
Notice the difference with the following where they have .../jdk${feature}/NUMBER/GPL
https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
https://download.java.net/java/early_access/jdk13/12/GPL/openjdk-13-ea+12_linux-x64_bin.tar.gz
Not sure if this is a bug on their part or intended
Lookup current URL of a JDK that is in GA state. Like openjdk11 as of now: http://jdk.java.net/11/
Origin: https://travis-ci.community/t/install-of-oraclejdk11-is-failing/1856/12
Follow-up from #33 and https://travis-ci.community/t/cannot-install-oracle-jdk-11/3892/4?u=sormuras
BCL
from license
option9-BCL
, 10-BCL
, and 11-BCL
URLs from scriptAnd if it does not exist it should fail loud and maybe not adding the java to the PATH etc
https://github.com/sormuras/bach/blob/master/install-jdk.sh#L291
BTW: shouldn't JDK 10 contain all the necessary certificates already? I can see that the mentioned JEP 319 is marked as "Release 10", ah but the mentioned issue JDK-8196141 is marked as 11 ...
Support something like --url https://what.ever...
overriding look-up inside the script and use that user-defined URL for downloading a specific JDK release.
https://travis-ci.org/sormuras/sormuras.github.io/jobs/525707976
Work in progress...
Use and include the nohttp tool.
...and remove - chmod u+x test.jsh build.jsh demo.jsh
from .travis.yml
jlink
: https://docs.oracle.com/en/java/javase/11/tools/jlink.html
You can use the jlink
tool to assemble and optimize a set of modules and their dependencies into a custom runtime image.
Resources from main and test should copied by the compile
task to their respective target directories. Then tasks like jar
or test
can pickup the resources automatically.
At the moment, there are lot of 404 errors at http://jdk.java.net/11 ... the HTML page still says "jdk-11-ea+15" but the deployed archives are already on "jdk-11-ea+16".
https://twitter.com/sormuras/status/1002226003647791105
install-jdk.sh
usage-F|-f|--feature ea
no feature option specified, defaults to
ea``jdk:
constants offered by Travis CIopenjdk-ea
oraclejdk-ea
This no longer works for downloading early-access builds of OpenJDK 11. It gives:
install-jdk.sh 2018-07-17
Expected feature release number in range of 9 to 10, but got: 11
This may have been caused by a change to Oracle's site.
Should work w/o intervention, but you never know.
Line 209 in f10033f
See https://travis-ci.org/sormuras/sormuras.github.io/jobs/386018676 -- it prints:
$ bash install-jdk.sh -L BCL --target $JAVA_HOME --workspace $HOME/.cache/install-jdk
install-jdk.sh 2018-05-30
The command "bash install-jdk.sh -L BCL --target $JAVA_HOME --workspace ..."
failed and exited with 1 during .
Better message: Can't determine ".tar.gz" to load. Tried url: ...
Axis -F 9
failed as of today: https://travis-ci.org/sormuras/sormuras.github.io/jobs/367741400
Reason copied from: http://jdk.java.net/9
JDK 9 has been superseded. Please visit jdk.java.net for the current version.
Older releases, which do not include the most up to date security vulnerability fixes and are no longer recommended for use in production, remain available in the OpenJDK Archive.
Solution: Support build listed at http://jdk.java.net/archive/
Oracle updated their JDK to 11.0.3.
install-jdk.sh
was updated via 9067da2 -- Travis CI needs to update their copy of the script. See also https://travis-ci.community/t/install-of-oraclejdk11-is-failing-11-0-3-12/3887
I am opening a new issue report as the error looks different than the one in #46 and #47.
$ sh install-jdk.sh --target test --feature "11" --license "GPL" --cacerts
install-jdk.sh 2019-04-18
Variables:
feature = 11
license = GPL
os = linux-x64
url = https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
status = 200
archive = /home/danysk/openjdk-11.0.2_linux-x64_bin.tar.gz
Downloading JDK from https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz...
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
If you specify this as URL: https://builds.shipilev.net/openjdk-shenandoah-jdk8/openjdk-shenandoah-jdk8-latest-x86_64-release.tar.xz it fails via
gzip: stdin: not in gzip format
But when using tar ala:
tar -xf file.tar.xz
it works, as recent versions auto detect the compression. Or one can use the explicit flag -J
and auto detect the ending in the script.
install-jdk.sh
will only serve JDK builds available via https://jdk.java.net
Supporting AdoptOpenJDK "natively", i.e. mapping archived and released JDKs to AdoptOpenJDK API for downloading, will cease ... soon. You may still use AdoptOpenJDK builds via the --url
option:
source install-jdk.sh --url 'https://api.adoptopenjdk.net/v2/binary/releases/openjdk11?openjdk_impl=openj9&os=linux&arch=x64&release=latest&heap_size=normal&type=jdk'
See more configurations here: https://travis-ci.org/sormuras/sormuras.github.io
Or at least provide an example how to use https://github.com/tools4j/unix4j
See google/google-java-format#106
Or work-around via custom CRC32 check like in FormatterPlugin.java
$ ./install-jdk.sh --dry-run --license GPL --feature 11 --os linux-x64
install-jdk.sh 2019-04-17
Couldn't determine a download url for 11-GPL on linux-x641
This appears unrelated to #46, since I continue to get the same error message even when reverting fe56033, which was applied to fix that issue.
I think the root of the problem might be that early access for JDK 11 has ended: https://jdk.java.net/11/
Cf. 10 and 12:
$ ./install-jdk.sh --dry-run --license GPL --feature 10 --os linux-x64
install-jdk.sh 2019-04-17
Variables:
feature = 10
license = GPL
os = linux-x64
url = https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
status = 200
archive = /home/nick/openjdk-10.0.2_linux-x64_bin.tar.gz
$ ./install-jdk.sh --dry-run --license GPL --feature 12 --os linux-x64
install-jdk.sh 2019-04-17
Variables:
feature = 12
license = GPL
os = linux-x64
url = https://download.java.net/java/GA/jdk12.0.1/69cfe15208a647278a19ef0990eea691/12/GPL/openjdk-12.0.1_linux-x64_bin.tar.gz
status = 200
archive = /home/nick/openjdk-12.0.1_linux-x64_bin.tar.gz
0.01s$ unset -v _JAVA_OPTIONS
before_script.2
0.20s$ wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
--2018-08-10 20:17:03-- https://github.com/sormuras/bach/raw/master/install-jdk.sh
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh [following]
--2018-08-10 20:17:03-- https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9544 (9.3K) [text/plain]
Saving to: ‘install-jdk.sh’
0K ......... 100% 108M=0s
2018-08-10 20:17:03 (108 MB/s) - ‘install-jdk.sh’ saved [9544/9544]
$ source install-jdk.sh -F 10 -L BCL
install-jdk.sh 2018-07-17
curl: (7) Failed to connect to jdk.java.net port 80: Connection timed out
Build failure on travis:
https://travis-ci.org/apereo/cas/jobs/414672861
Has the URL changed?
Work-around: use Bach#execute
jshell https://bit.ly/bach-java https://bit.ly/bach-jsh ...
GraalVM has a different release schedule/versioning than OpenJDK. The work is still being done for JDK 11 support. Does it make sense to adds support GraalVM oss binaries in install-jdk.sh
? Graal is super interesting because of it's native-image
(java AOT) generation feature.
Before downloading artifacts from Property.MAVEN_REPOSITORY
, check user's local Maven repositories (Maven, Gradle, ...) first.
Using oraclejdk8 fails with
Expected feature release number in range of 9 to 12, but got: 8
Compilation chokes on current HEAD revision.
jshell https://raw.githubusercontent.com/sormuras/bach/master/src/bach/Bach.java
Error:
cannot find symbol
symbol: variable Property
for (var property : Property.values()) {
^------^
Error:
cannot find symbol
symbol: variable Action
var action = Action.valueOf(Property.ACTION.get().toUpperCase());
^----^
Error:
package Property does not exist
var action = Action.valueOf(Property.ACTION.get().toUpperCase());
^-------------^
Error:
cannot find symbol
symbol: variable Action
var action = Action.valueOf(argument.toUpperCase());
[...]
Error:
cannot find symbol
symbol: class Command
var command = new Command(executable.toString()).addAll(arguments);
^-----^
Error:
exception java.io.IOException is never thrown in body of corresponding try statement
} catch (IOException e) {
^----------------------...
| Welcome to JShell -- Version 11.0.2
| For an introduction type: /help intro
This revision works!
jshell https://raw.githubusercontent.com/sormuras/bach/5e7165ef06c26423d8906038f2e061eb6cd8f374/src/bach/Bach.java
Here it stopped working...
jshell https://raw.githubusercontent.com/sormuras/bach/13cf5eb5a9045ac0158d6da585105d359591ba7f/src/bach/Bach.java
sh install-jdk.sh --target test --feature "12" --license "GPL" --cacerts
install-jdk.sh 2019-03-23
Couldn't determine a download url for 12-GPL on linux-x64
The script works correctly for OpenJDK 11 and even for the JDK 13 preview:
sh install-jdk.sh --target test --feature "11" --license "GPL" --cacerts
install-jdk.sh 2019-03-23
Variables:
feature = 11
license = GPL
os = linux-x64
url = https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
status = 200
archive = /home/danysk/openjdk-11.0.2_linux-x64_bin.tar.gz
Downloading JDK from https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz...
sh install-jdk.sh --target test --feature "13" --license "GPL" --cacerts
install-jdk.sh 2019-03-23
Variables:
feature = 13
license = GPL
os = linux-x64
url = https://download.java.net/java/early_access/jdk13/16/GPL/openjdk-13-ea+16_linux-x64_bin.tar.gz
status = 200
archive = /home/danysk/openjdk-13-ea+16_linux-x64_bin.tar.gz
Downloading JDK from https://download.java.net/java/early_access/jdk13/16/GPL/openjdk-13-ea+16_linux-x64_bin.tar.gz...
This say happens before the silent variable is set is parse_options.
https://github.com/sormuras/bach/blob/master/src/bach/Bach.java#L399-L401
java.add("--class-path");
java.add(bach.download(Property.TOOL_URI_JUNIT));
java.add("org.junit.platform.console.ConsoleLauncher");
Since JUnit 5 ships as explicit Java modules, this "class-path hack" no longer works. Use the module-path, Luke.
It would be great, if install-jdk.sh
supported Eclipse OpenJ9 JDKs.
Stable and nightly builds for OpenJDK 8, 9, and 10 with OpenJ9 can be downloaded at https://adoptopenjdk.net/releases.html?variant=openjdk8-openj9.
Support download and installation for mac osx archives.
Looks like the archive from AdoptOpenJDK doesn’t contain a lib/security/cacerts
directory by default.
https://travis-ci.community/t/install-jdk-sh-failing-for-openjdk9-and-10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.