halcyon / asdf-java

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

System Java now works on macOS #142

Open delgurth opened 3 years ago

delgurth commented 3 years ago

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

Added special case for macOS in all 4 set-java-home scripts. Also created tests to validate this.

Updated the README.md to contain information on how to use the set-java-home scripts.

Cloned mstksg/get-package and released delgurth/get-package@v3 because it was using linuxbrew on Ubuntu and because I needed the apt-update (not released by mstksg) and -y flag in the apt-get install (when running github action on https://github.com/nektos/act). I've created an issue in the mstksg repository about this.

added .editorconfig because of mixed indent styles added .gitignore to ignore Intellij directory

asdf/asdf.sh needs $PWD in front as soon as you change directories

added tests for JAVA_HOME setting added tests for macOS JAVA_HOME setting in case version is set to system

Unfortunately the tests are not exactly as it would be on a system because of the way github actions spawn shells. Have to call the bash function _asdf_java_prompt_command and the fish & zsh function asdf_update_java_home to actually update the JAVA_HOME.

halcyon commented 3 years ago

LGTM.

@joschi thoughts?

delgurth commented 3 years ago

@joschi did you have time to look at this pull-request?

akkadaya commented 1 year ago

Why this PR is still open since 2021-04-05?

halcyon commented 1 year ago

It's still open because the issues joschi commented on were not resolved.

delgurth commented 1 year ago

I'll try to redo the work, since it's giving quite some conflicts now.

mrmeszaros commented 1 year ago

@delgurth if You need help, please let me know, I would be glad to help out