Commit Graph

91 Commits

Author SHA1 Message Date
Bojun Ren
b966b6f706
support user home for macOS (#221)
Fix #213.

To install jdk at user home, set `java_macos_integration_in_home = yes`
2024-09-23 23:22:44 -04:00
Scott McLeod
783676838d
Fix error introduced by PR #211 2023-10-08 13:22:26 -04:00
Jarmo Pertman
bf0ed9ff67
Create cache dir for currently logged in user (#211)
In a multi user environment it's possible that some other user has already created CACHE_DIR with its own permissions breaking this plugin. Add currently logged in user name into CACHE_DIR directory name so that it would be user specific and have correct permissions for every user
2023-10-08 12:56:28 -04:00
Jonatan Ivanov
4f4d422a8c
Release type all uses the all file now, previously it used the ga file (#198) 2023-05-17 00:21:19 -04:00
Mathew Savage
ac1920f8c3
Removes silent fail from retrieve-release-data() (#200) 2023-05-17 00:19:28 -04:00
zuisong
105ebbf270
vendoring the asdf utils into asdf-java (#202) 2023-05-17 00:18:27 -04:00
Jonatan Ivanov
02b4fb3e53
Support multiple release types and EA builds (#179)
* Support multiple release types and EA builds
* Improve iteration
* Keep files without release type backward compatible.
2023-01-06 10:36:36 -05:00
Russell Dempsey
e883d242d0
Allow unset ASDF_DIR environment variable (#163)
Resolves the following error that displays for users who do not set ASDF_DIR:

    $HOME/.asdf/plugins/java/bin/list-all: line 3: /lib/utils.bash: No such file or directory

As indicated in the [official asdf docs][asdf docs], `ASDF_DIR` should default to `~/.asdf`, though asdf itself defaults to `$HOME/.asdf`:

> ASDF_DIR - Defaults to ~/.asdf - Location of the asdf scripts. If you install asdf to some other directory, set this to that directory. For example, if you are installing via the AUR, you should set this to /opt/asdf-vm.

[asdf docs]: http://asdf-vm.com/manage/configuration.html#environment-variables
2021-11-01 16:38:42 -04:00
Juange Núñez
4a52255a36
Use platform specific cache files to store java release data (#157)
asdf list all java and other asdf plugin commands could run with rosetta emulation for X86_64 on apple silicon using the shell arch command so we need to make sure the cache file is invalidated when we target different architectures otherwise we would incorrectly use the cached file created from previous runs
2021-08-22 13:17:36 -05:00
Markus Perndorfer
8aa9628cb2
set JAVA_HOME in exec-env (#148) 2021-08-07 18:04:46 -05:00
Wessel van Norel
0010d1f98d
[macOS] Zulu install for /usr/libexec/java_home does not work (#138)
* Release is a file which results in the absolute_dir_path command to fail to return the expected result. Changed it to bin/..

Fixes https://github.com/halcyon/asdf-java/issues/137

* Added test to validate the /usr/libexec/java_home working as expected

* Added information to the liberica install about it not being integrated in /usr/libexec/java_home

* Only run the update-data on the main repository
2021-04-06 11:54:36 -04:00
Jochen Schalanda
d1f2652186
Add support for aarch64 and armv7l machine architectures (#129)
* Add support for aarch64

* Add ARM64 build to Travis CI build matrix

* Add JDK data for aarch64

* Add support for armv7l

* Add JDK data for armv7l/arm32-vfp-hflt

* Use `arm64` (Apple M1 on Darwin) as alias for `aarch64`

Refs: https://developer.apple.com/forums/thread/668206

> ```
> # uname -a
> Darwin MacBook-Pro.local 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:10 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8101 arm64
> ```

* Update JDK data
2021-03-11 09:15:28 -05:00
Fernando Crespo
e5e43b7214
Replace realpath occurrences with a custom function (#114)
* Replace realpath ocurrences with a custom function

* Shellcheck fix

* Add absolute_dir_path to set-java-home files
2021-02-04 22:05:49 -05:00
Fernando Crespo
825b63d076
Support for integrating with macOS /usr/libexec/java_home (#112)
Support for integrating with macOS /usr/libexec/java_home
2020-11-16 11:40:25 -05:00
Jochen Schalanda
7a04f7c1a6 Use BSD stat on macOS even if sha256sum is installed 2020-11-11 16:49:23 -05:00
Jochen Schalanda
c4a63a5569 Use upstream URL for getting release data 2020-06-24 20:37:09 -04:00
Jochen Schalanda
9bc3376b97 Update bin/functions to use release data 2020-06-24 20:37:09 -04:00
Scott McLeod
8baa3f7961 Fold retrieve-sapmachine into retrieval code, use globbing for cache 2020-04-26 19:39:09 -04:00
Scott McLeod
02ca1c820a Cleanup cache logic 2020-04-26 19:39:09 -04:00
Scott McLeod
1b6aaee2ea
Old MacOS versions do not support base64 -d 2020-04-14 15:20:00 -04:00
Scott McLeod
0ebf8c1cc0 Standardize on AdoptJDK v3 API 2020-04-14 10:47:02 -04:00
Nicklas Moberg
e5391ad10e JDK 14 2020-04-03 15:50:16 -04:00
Jochen Schalanda
e276af2aaa
Set exit trap only after TEMP_DIR has been set
Refs #63
Refs #64
2020-03-17 08:47:09 +01:00
Jochen Schalanda
b0dcb5ae05
Check that temporary directory exists before deleting
Before deleting the temporary directory (`$TEMP_DIR`) at the end of the script,
make sure that it exists so that we don't accidentally delete the user's home directory.

Fixes #63
2020-03-15 01:53:30 +01:00
Jochen Schalanda
573976b13b Migrate to AdoptOpenJDK API v3
The AdoptOpenJDK API v2 is deprecated and will eventually be shut down.
Additionally, it currently has problems providing data for OpenJDK 13.

Unfortunately the API response format changed slightly, so that the static data for Zulu Community and Amazon Corretto had to be updated, too.

https://api.adoptopenjdk.net/swagger-ui/
https://github.com/AdoptOpenJDK/openjdk-api-v3
2020-03-01 14:44:43 +01:00
Jochen Schalanda
2ed7eb06d6 Revert "Merge pull request #55 from halcyon/sm-fix-master"
This reverts commit a5f57e149e, reversing
changes made to f1b85bca66.
2020-03-01 13:45:45 +01:00
Scott Mcleod
35b4def8e8
Fix failing master 2020-02-29 10:21:47 -05:00
Jochen Schalanda
e067262abf
Fix shellcheck warnings 2020-02-27 16:15:07 +01:00
Jochen Schalanda
3d5b9bd28c
Fix content of "os" field in jq expression 2020-02-26 14:59:35 +01:00
Jochen Schalanda
e64c7e203f
Retrieve AdoptOpenJDK and SapMachine command in install function 2020-02-26 14:59:35 +01:00
Jochen Schalanda
12b79730e7
Add support for SapMachine
SapMachine is an OpenJDK release maintained and supported by SAP

https://sap.github.io/SapMachine/
2020-02-26 14:59:35 +01:00
Scott McLeod
a0fd84e721
Resolves #40 - don't change directory to ${PWD} on EXIT 2020-01-14 15:48:14 -05:00
Klaus Hartl
56f73d09e3 Add legacy filename support for jenv 2019-11-22 16:18:54 +01:00
Scott McLeod
00bb71562b
Use full path for MacOS binaries that conflict with coreutils 2019-11-20 14:38:58 -05:00
Flrn Prz
0320426738 Add check-jq function to properly show an error when jq is not installed 2019-09-30 16:21:34 +02:00
Michael McLellan
2e23f4a8f6 Use proper RELEASE variable name 2019-09-18 16:12:14 -04:00
Michael McLellan
4a85daa675 Add JDK 13 URL 2019-09-17 20:32:46 -04:00
Scott McLeod
67552c0e6f
Address #13 2019-09-12 16:40:16 -04:00
Scott McLeod
fb4dc4b2bf
Prefer variables over functions 2019-09-10 13:33:29 -04:00
Scott McLeod
63ca3b9081
Add jq to OSX 2019-09-09 18:59:10 -04:00
Scott McLeod
f3c7ba54cb
Use functions for improved bash compatability 2019-09-09 15:29:26 -04:00
Scott McLeod
2a22a1723e
New architecture 2019-09-09 14:30:31 -04:00
Scott McLeod
a39f3bbb79
Switching to new architecture. Previous architecture archived to skotchpine branch 2019-09-09 14:29:34 -04:00
Stefano De Vuono
ac0ecf3c96 add mac_hotspot case to statement in unpack_java function 2019-08-01 12:25:17 -05:00
Scott McLeod
316a7e3647
Cleanup 2019-07-05 13:10:05 -04:00
Scott McLeod
62b812ae5d
Account for differences in mktemp on MacOS 2019-07-05 12:12:42 -04:00
Scott McLeod
b84e6ea0e2
Use a temp work dir when installing 2019-06-18 18:53:54 -04:00
Scott McLeod
13df2ad8d3
Merge pull request #5 from halcyon/adopt-openjdk-corretto
Add adopt-openjdk and correto
2019-06-18 17:50:46 -04:00
Scott McLeod
ccf002e5f9
Add adopt-openjdk and correto 2019-06-18 17:47:27 -04:00
Scott McLeod
0f7f6c8192
Adding openjdk-12.0.1 2019-06-18 16:22:26 -04:00