halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
454 stars 86 forks source link

Adding early access JDKs #176

Closed bric3 closed 1 year ago

bric3 commented 2 years ago

@joschi's metadata allows to list early access JDKs, it would be neat if we could toggle a flag to download those. Currently I am manually downloading these and putting them in the install folder.

The following endpoint lists Valhalla, loom and panama for example

curl -X 'GET' \
  'https://joschi.github.io/java-metadata/metadata/ea/macosx/x86_64/jdk/hotspot/openjdk.json' \
  -H 'accept: application/json'
jonatan-ivanov commented 2 years ago

I think this would be very useful especially for power-users of asdf-java who often needs to deal with ea builds.

@joschi this would be easier to implement if the metadata service would have an all option for the release type so that it is not necessary to query ga and ea then merge the results. What do you think?

jonatan-ivanov commented 2 years ago

@bric3 The PR above should resolve this issue but it depends on files in this repo. If you want a less manual process you can force using local metadata on top of the changes in the PR: https://github.com/jonatan-ivanov/asdf-java/commit/13e9c728a84886b7d48d5bbb7db3dac0fe44882a also on this branch: https://github.com/halcyon/asdf-java/compare/master...jonatan-ivanov:ea-builds

joschi commented 2 years ago

this would be easier to implement if the metadata service would have an all option for the release type so that it is not necessary to query ga and ea then merge the results.

https://joschi.github.io/java-metadata/metadata/all.json exists, but you're probably looking for https://joschi.github.io/java-metadata/metadata/${os}/${arch}.json which is currently not supported.

Given that we would (hopefully) implement a flag to offer early access releases, I think storing them in two different data files actually makes sense. You would only need to "query" (or grep) the file with the EA versions if users opted in and could skip it otherwise.