Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when using Jenv for Java version management #14

Open
socket70 opened this issue Feb 2, 2021 · 12 comments
Open

Fails when using Jenv for Java version management #14

socket70 opened this issue Feb 2, 2021 · 12 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@socket70
Copy link

socket70 commented Feb 2, 2021

I just migrated from gdub to gng and my first attempt to use it caused the following error:

$ gw build
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'CMSClassUnloadingEnabled'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

To Reproduce
Steps to reproduce the behavior:

  1. brew install jenv
  2. brew install gng
  3. gw build
  4. see error

More Information

I am able to run the java command directly, so I don't think the error is in jenv itself.
I can also run ./gradlew build and it works correctly.
So the problem seems to be in gng/gw.

  • Shell&Version: 3.2.57(1)-release (x86_64-apple-darwin20)
  • DEBUG Output:
$ DEBUG=1 gw build
++ export SHELLOPTS
++ readonly 'INFO_COLOR=\033[1;96m'
++ INFO_COLOR='\033[1;96m'
++ readonly 'NO_COLOR=\033[0m'
++ NO_COLOR='\033[0m'
++ readonly 'ERROR_COLOR=\033[0;31m'
++ ERROR_COLOR='\033[0;31m'
++ [[ 1 == 1 ]]
++ trap __errorCallBack__ ERR
+ readonly GRADLEW=gradlew
+ GRADLEW=gradlew
+ declare -a __GNG_CONFIG
++ basename /usr/local/bin/gw
+ readonly SCRIPT_NAME=gw
+ SCRIPT_NAME=gw
+ '[' gng = gw ']'
+ case "${1:-}" in
+ gradle build
+ local gradle
++ select_gradle /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
++ local dir=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
++ local gradlew
+++ lookup gradlew /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
+++ local file=gradlew
+++ local curr_path=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
+++ [[ -z /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr ]]
+++ [[ /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr == \/ ]]
+++ [[ -e /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew ]]
+++ echo /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew
+++ break
++ gradlew=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew
++ [[ -z /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew ]]
++ echo /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew
++ return 0
+ gradle=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew
+ debug 'Using gradle at '\''/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew'\'' to run'
+ [[ 1 == 0 ]]
+ echo -e '\033[1;96mUsing gradle at '\''/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew'\'' to run\033[0m\n'
Using gradle at '/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew' to run

++ dirname /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradlew
+ load_config /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
+ unset __GNG_CONFIG
+ local curr_path=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr
+ local cfg_file=/Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradle/gng.cfg
+ '[' -f /Users/USERNAME/Documents/Projects/Production/heimdallr/heimdallr/gradle/gng.cfg ']'
+ readonly __GNG_CONFIG
+ eval 'set +o allexport
set -o braceexpand
set +o emacs
set +o errexit
set +o errtrace
set +o functrace
set -o hashall
set +o histexpand
set +o history
set +o ignoreeof
set -o interactive-comments
set +o keyword
set +o monitor
set +o noclobber
set +o noexec
set +o noglob
set +o nolog
set +o notify
set +o nounset
set +o onecmd
set +o physical
set +o pipefail
set +o posix
set +o privileged
set +o verbose
set +o vi
set +o xtrace
shopt -u cdable_vars
shopt -u cdspell
shopt -u checkhash
shopt -u checkwinsize
shopt -s cmdhist
shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -u expand_aliases
shopt -u extdebug
shopt -u extglob
shopt -s extquote
shopt -u failglob
shopt -s force_fignore
shopt -u gnu_errfmt
shopt -u histappend
shopt -u histreedit
shopt -u histverify
shopt -s hostcomplete
shopt -u huponexit
shopt -s interactive_comments
shopt -u lithist
shopt -u login_shell
shopt -u mailwarn
shopt -u no_empty_cmd_completion
shopt -u nocaseglob
shopt -u nocasematch
shopt -u nullglob
shopt -s progcomp
shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
shopt -s sourcepath
shopt -u xpg_echo'
++ set +o allexport
++ set -o braceexpand
++ set +o emacs
++ set +o errexit
++ set +o errtrace
++ set +o functrace
++ set -o hashall
++ set +o histexpand
++ set +o history
++ set +o ignoreeof
++ set -o interactive-comments
++ set +o keyword
++ set +o monitor
++ set +o noclobber
++ set +o noexec
++ set +o noglob
++ set +o nolog
++ set +o notify
++ set +o nounset
++ set +o onecmd
++ set +o physical
++ set +o pipefail
++ set +o posix
++ set +o privileged
++ set +o verbose
++ set +o vi
++ set +o xtrace
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.
@dantesun
Copy link
Member

dantesun commented Feb 2, 2021

I am using jenv too, but can't reproduce your failure.

From your logs, I can tell that the jenv fails, which in turn causing the Gradle failure(Unrecognized VM option 'CMSClassUnloadingEnabled'). But I don't have any clue why jenv failed with syntax error near unexpected token <'`.
This error most likely appears if you are running in a wrong shell where process substitution (the <(some command) part) is not working. (/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17).

Could you try creating an empty project using gng wrapper to see if anything fails? For example:

❯ gng wrapper -v 4.10.3 -d test
 Installing Gradle Wrapper in test. (version=4.10.3, distributionType=all, mirrorUrl=<Not Specified>)

❯ cd test
❯ jenv local 1.8

❯ gw

> Task :help

Welcome to Gradle 4.10.3.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
❯ jenv doctor
[OK]	JAVA_HOME variable probably set by jenv PROMPT
[OK]	Java binaries in path are jenv shims
[OK]	Jenv is correctly loaded
❯ command -v java
/Users/dsun/.jenv/shims/java
❯ jenv which java
/Users/dsun/.jenv/versions/1.8/bin/java
❯ jenv --version
jenv 0.5.4

@dantesun dantesun added the help wanted Extra attention is needed label Feb 2, 2021
@dantesun dantesun self-assigned this Feb 2, 2021
@MarcBernstein
Copy link

Not the original poster, but am running into the same issue with jenv 0.5.4 and macOS 11.1. I ran through those testing steps @dantesun and getting the same error as in #14 (comment). The gw command was successful in that it does display the :help task output, but each command shows

/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'

at the start.

@csarmiento
Copy link

I am also running in the same issue, before coming here did a little research and found this: linux-china/jenv#28 which may be helpful.

Also, another thing to keep in mind is that newer versions of MacOS use zsh instead of bash nowadays.

@socket70
Copy link
Author

socket70 commented Feb 3, 2021

Sorry for the late reply @dantesun

I tried your suggestion but see the same errors. See the transcript below:

$ gng wrapper -v 4.10.3 -d test
 Installing Gradle Wrapper in test. (version=4.10.3, distributionType=all, mirrorUrl=<Not Specified>)

$ cd test

$ jenv local 1.8

$ gw
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'
Downloading https://services.gradle.org/distributions/gradle-4.10.3-all.zip
...........10%...........20%...........30%...........40%............50%...........60%...........70%...........80%...........90%............100%
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'CMSClassUnloadingEnabled'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@dantesun
Copy link
Member

dantesun commented Feb 3, 2021

Sorry for the late reply @dantesun

I tried your suggestion but see the same errors. See the transcript below:

$ gng wrapper -v 4.10.3 -d test
 Installing Gradle Wrapper in test. (version=4.10.3, distributionType=all, mirrorUrl=<Not Specified>)

$ cd test

$ jenv local 1.8

$ gw
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'
Downloading https://services.gradle.org/distributions/gradle-4.10.3-all.zip
...........10%...........20%...........30%...........40%............50%...........60%...........70%...........80%...........90%............100%
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'CMSClassUnloadingEnabled'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@socket70 I hate to bother you but I really need your help here. Could you repeat these steps with JENV_DEBUG and DEBUG ? Please copy the commands bellow and post your transcript. Thank you!

gng wrapper -v 4.10.3 -d test
cd test
jenv local 1.8
export JENV_DEBUG=1
export DEBUG=1 
gw 

You can turn off all the debug output by unsetting the variables.

unset JENV_DEBUG
unset DEBUG

@socket70
Copy link
Author

Here is the output from the latest test @dantesun.

ATL-MPRIDEMORE2 (AWS:default) [Documents]
$ gng wrapper -v 4.10.3 -d test
 Installing Gradle Wrapper in test. (version=4.10.3, distributionType=all, mirrorUrl=<Not Specified>)

ATL-MPRIDEMORE2 (AWS:default) [Documents]
$ cd test
ATL-MPRIDEMORE2 (AWS:default) [test]
$ jenv local 1.8
ATL-MPRIDEMORE2 (AWS:default) [test]
$ export JENV_DEBUG=1
ATL-MPRIDEMORE2 (AWS:default) [test]
$ export DEBUG=1
ATL-MPRIDEMORE2 (AWS:default) [test]
$ gw
++ export SHELLOPTS
++ readonly 'INFO_COLOR=\033[1;96m'
++ INFO_COLOR='\033[1;96m'
++ readonly 'NO_COLOR=\033[0m'
++ NO_COLOR='\033[0m'
++ readonly 'ERROR_COLOR=\033[0;31m'
++ ERROR_COLOR='\033[0;31m'
++ [[ 1 == 1 ]]
++ trap __errorCallBack__ ERR
+ readonly GRADLEW=gradlew
+ GRADLEW=gradlew
+ declare -a __GNG_CONFIG
++ basename /usr/local/bin/gw
+ readonly SCRIPT_NAME=gw
+ SCRIPT_NAME=gw
+ '[' gng = gw ']'
+ case "${1:-}" in
+ gradle
+ local gradle
++ select_gradle /Users/michaelpridemore/Documents/test
++ local dir=/Users/michaelpridemore/Documents/test
++ local gradlew
+++ lookup gradlew /Users/michaelpridemore/Documents/test
+++ local file=gradlew
+++ local curr_path=/Users/michaelpridemore/Documents/test
+++ [[ -z /Users/michaelpridemore/Documents/test ]]
+++ [[ /Users/michaelpridemore/Documents/test == \/ ]]
+++ [[ -e /Users/michaelpridemore/Documents/test/gradlew ]]
+++ echo /Users/michaelpridemore/Documents/test/gradlew
+++ break
++ gradlew=/Users/michaelpridemore/Documents/test/gradlew
++ [[ -z /Users/michaelpridemore/Documents/test/gradlew ]]
++ echo /Users/michaelpridemore/Documents/test/gradlew
++ return 0
+ gradle=/Users/michaelpridemore/Documents/test/gradlew
+ debug 'Using gradle at '\''/Users/michaelpridemore/Documents/test/gradlew'\'' to run'
+ [[ 1 == 0 ]]
+ echo -e '\033[1;96mUsing gradle at '\''/Users/michaelpridemore/Documents/test/gradlew'\'' to run\033[0m\n'
Using gradle at '/Users/michaelpridemore/Documents/test/gradlew' to run

++ dirname /Users/michaelpridemore/Documents/test/gradlew
+ load_config /Users/michaelpridemore/Documents/test
+ unset __GNG_CONFIG
+ local curr_path=/Users/michaelpridemore/Documents/test
+ local cfg_file=/Users/michaelpridemore/Documents/test/gradle/gng.cfg
+ '[' -f /Users/michaelpridemore/Documents/test/gradle/gng.cfg ']'
+ IFS='
'
+ read -r -d '' -a __GNG_CONFIG
++ __load_cfg
++ local line_no=0
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# Configuration file of gng'
+++ : '# Configuration file of gng'
+++ : '# Configuration file of gng'
+++ : '# Configuration file of gng'
+++ printf %s '# Configuration file of gng'
++ line='# Configuration file of gng'
++ [[ # Configuration file of gng =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# 1. key/value pair is separated using '\''='\'''
+++ : '# 1. key/value pair is separated using '\''='\'''
+++ : '# 1. key/value pair is separated using '\''='\'''
+++ : '# 1. key/value pair is separated using '\''='\'''
+++ printf %s '# 1. key/value pair is separated using '\''='\'''
++ line='# 1. key/value pair is separated using '\''='\'''
++ [[ # 1. key/value pair is separated using '=' =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# 2. Line starts with '\''#'\'' will be ignored.'
+++ : '# 2. Line starts with '\''#'\'' will be ignored.'
+++ : '# 2. Line starts with '\''#'\'' will be ignored.'
+++ : '# 2. Line starts with '\''#'\'' will be ignored.'
+++ printf %s '# 2. Line starts with '\''#'\'' will be ignored.'
++ line='# 2. Line starts with '\''#'\'' will be ignored.'
++ [[ # 2. Line starts with '#' will be ignored. =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# 3. Empty line is ignored'
+++ : '# 3. Empty line is ignored'
+++ : '# 3. Empty line is ignored'
+++ : '# 3. Empty line is ignored'
+++ printf %s '# 3. Empty line is ignored'
++ line='# 3. Empty line is ignored'
++ [[ # 3. Empty line is ignored =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
+++ : '# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
+++ : '# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
+++ : '# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
+++ printf %s '# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
++ line='# 4. Variable Substitution based on envsubst. '\''envsubst'\'' is from GNU gettext utilities.'
++ [[ # 4. Variable Substitution based on envsubst. 'envsubst' is from GNU gettext utilities. =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '#    Please visit https://command-not-found.com/envsubst to find out how to install it'
+++ : '#    Please visit https://command-not-found.com/envsubst to find out how to install it'
+++ : '#    Please visit https://command-not-found.com/envsubst to find out how to install it'
+++ : '#    Please visit https://command-not-found.com/envsubst to find out how to install it'
+++ printf %s '#    Please visit https://command-not-found.com/envsubst to find out how to install it'
++ line='#    Please visit https://command-not-found.com/envsubst to find out how to install it'
++ [[ #    Please visit https://command-not-found.com/envsubst to find out how to install it =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
+++ : '# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
+++ : '# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
+++ : '# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
+++ printf %s '# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
++ line='# 5. '\''envsubst'\'' is strongly recommended. But it is not mandatory. You can still configure '\''gng'\'' using plain values.'
++ [[ # 5. 'envsubst' is strongly recommended. But it is not mandatory. You can still configure 'gng' using plain values. =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim ''
+++ : ''
+++ : ''
+++ : ''
+++ printf %s ''
++ line=
++ [[ '' =~ ^# ]]
++ [[ -z '' ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '# https://github.com/ddimtirov/gwo-agent'
+++ : '# https://github.com/ddimtirov/gwo-agent'
+++ : '# https://github.com/ddimtirov/gwo-agent'
+++ : '# https://github.com/ddimtirov/gwo-agent'
+++ printf %s '# https://github.com/ddimtirov/gwo-agent'
++ line='# https://github.com/ddimtirov/gwo-agent'
++ [[ # https://github.com/ddimtirov/gwo-agent =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '#gwo_agent_jar=~/.gradle/gwo-agent.jar'
+++ : '#gwo_agent_jar=~/.gradle/gwo-agent.jar'
+++ : '#gwo_agent_jar=~/.gradle/gwo-agent.jar'
+++ : '#gwo_agent_jar=~/.gradle/gwo-agent.jar'
+++ printf %s '#gwo_agent_jar=~/.gradle/gwo-agent.jar'
++ line='#gwo_agent_jar=~/.gradle/gwo-agent.jar'
++ [[ #gwo_agent_jar=~/.gradle/gwo-agent.jar =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim '#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
+++ : '#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
+++ : '#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
+++ : '#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
+++ printf %s '#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
++ line='#GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@'
++ [[ #GRADLE_OPTS=-javaagent:${gwo_agent_jar}=distributionUrl~=@https://services.gradle.org/distributions@https://mymirror/gradle/@ =~ ^# ]]
++ continue
++ IFS=
++ read -r line
++ (( line_no++ ))
+++ trim ''
+++ : ''
+++ : ''
+++ : ''
+++ printf %s ''
++ line=
++ [[ '' =~ ^# ]]
++ [[ -z '' ]]
++ continue
++ IFS=
++ read -r line
++ printf '\0'
+ readonly __GNG_CONFIG
+ eval 'set +o allexport
set -o braceexpand
set +o emacs
set +o errexit
set +o errtrace
set +o functrace
set -o hashall
set +o histexpand
set +o history
set +o ignoreeof
set -o interactive-comments
set +o keyword
set +o monitor
set +o noclobber
set +o noexec
set +o noglob
set +o nolog
set +o notify
set +o nounset
set +o onecmd
set +o physical
set +o pipefail
set +o posix
set +o privileged
set +o verbose
set +o vi
set +o xtrace
shopt -u cdable_vars
shopt -u cdspell
shopt -u checkhash
shopt -u checkwinsize
shopt -s cmdhist
shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -u expand_aliases
shopt -u extdebug
shopt -u extglob
shopt -s extquote
shopt -u failglob
shopt -s force_fignore
shopt -u gnu_errfmt
shopt -u histappend
shopt -u histreedit
shopt -u histverify
shopt -s hostcomplete
shopt -u huponexit
shopt -s interactive_comments
shopt -u lithist
shopt -u login_shell
shopt -u mailwarn
shopt -u no_empty_cmd_completion
shopt -u nocaseglob
shopt -u nocasematch
shopt -u nullglob
shopt -s progcomp
shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
shopt -s sourcepath
shopt -u xpg_echo'
++ set +o allexport
++ set -o braceexpand
++ set +o emacs
++ set +o errexit
++ set +o errtrace
++ set +o functrace
++ set -o hashall
++ set +o histexpand
++ set +o history
++ set +o ignoreeof
++ set -o interactive-comments
++ set +o keyword
++ set +o monitor
++ set +o noclobber
++ set +o noexec
++ set +o noglob
++ set +o nolog
++ set +o notify
++ set +o nounset
++ set +o onecmd
++ set +o physical
++ set +o pipefail
++ set +o posix
++ set +o privileged
++ set +o verbose
++ set +o vi
++ set +o xtrace
+ program=java
+ '[' java = java ']'
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ '[' -f -Xdock:icon=/Users/michaelpridemore/Documents/test/media/gradle.icns ']'
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ '[' -f /Users/michaelpridemore/Documents/test/gradle/wrapper/gradle-wrapper.jar ']'
+ export JENV_DIR=/Users/michaelpridemore/Documents/test/gradle/wrapper
+ JENV_DIR=/Users/michaelpridemore/Documents/test/gradle/wrapper
+ break
+ export JENV_ROOT=/usr/local/var/jenv
+ JENV_ROOT=/usr/local/var/jenv
+ exec /usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv exec java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/michaelpridemore/Documents/test/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/michaelpridemore/Documents/test/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' -z /usr/local/var/jenv ']'
+ JENV_ROOT=/usr/local/var/jenv
+ export JENV_ROOT
+ '[' -z /Users/michaelpridemore/Documents/test/gradle/wrapper ']'
+ cd /Users/michaelpridemore/Documents/test/gradle/wrapper
++ pwd
+ JENV_DIR=/Users/michaelpridemore/Documents/test/gradle/wrapper
+ cd /Users/michaelpridemore/Documents/test
+ export JENV_DIR
+ shopt -s nullglob
++ abs_dirname /usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv
+++ pwd
++ local cwd=/Users/michaelpridemore/Documents/test
++ local path=/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv
++ '[' -n /usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv ']'
++ cd /usr/local/Cellar/jenv/0.5.4/libexec/libexec
++ local name=jenv
+++ resolve_link jenv
++++ type -p greadlink readlink
++++ head -1
+++ /usr/bin/readlink jenv
+++ true
++ path=
++ '[' -n '' ']'
++ pwd
++ cd /Users/michaelpridemore/Documents/test
+ bin_path=/usr/local/Cellar/jenv/0.5.4/libexec/libexec
+ samedir /usr/local/var/jenv /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../
+ '[' -d /usr/local/var/jenv ']'
+ '[' -d /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../ ']'
++ resolvepath /usr/local/var/jenv
+++ pwd
++ local cwd=/Users/michaelpridemore/Documents/test
++ cd /usr/local/var/jenv
+++ pwd
++ echo /usr/local/var/jenv
++ cd /Users/michaelpridemore/Documents/test
+ local path1=/usr/local/var/jenv
++ resolvepath /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../
+++ pwd
++ local cwd=/Users/michaelpridemore/Documents/test
++ cd /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../
+++ pwd
++ echo /usr/local/Cellar/jenv/0.5.4/libexec
++ cd /Users/michaelpridemore/Documents/test
+ local path2=/usr/local/Cellar/jenv/0.5.4/libexec
+ '[' /usr/local/var/jenv == /usr/local/Cellar/jenv/0.5.4/libexec ']'
+ return 1
++ resolvepath /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../
+++ pwd
++ local cwd=/Users/michaelpridemore/Documents/test
++ cd /usr/local/Cellar/jenv/0.5.4/libexec/libexec/../
+++ pwd
++ echo /usr/local/Cellar/jenv/0.5.4/libexec
++ cd /Users/michaelpridemore/Documents/test
+ JENV_INSTALL_DIR=/usr/local/Cellar/jenv/0.5.4/libexec
+ export JENV_INSTALL_DIR
+ export PATH=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/var/jenv/shims:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/.local/bin
+ PATH=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/var/jenv/shims:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/.local/bin
+ hook_path=
+ export JENV_HOOK_PATH=
+ JENV_HOOK_PATH=
+ shopt -u nullglob
+ command=exec
+ case "$command" in
++ command -v jenv-exec
+ command_path=/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-exec
+ '[' -z /usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-exec ']'
+ shift 1
+ exec /usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-exec java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/michaelpridemore/Documents/test/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/michaelpridemore/Documents/test/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' java = --complete ']'
++ jenv-version-name
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' -z '' ']'
++ jenv-version-file
+ set -e
+ '[' -n 1 ']'
+ set -x
+ find_local_version_file /Users/michaelpridemore/Documents/test/gradle/wrapper
+ local root=/Users/michaelpridemore/Documents/test/gradle/wrapper
+ '[' -n /Users/michaelpridemore/Documents/test/gradle/wrapper ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/wrapper/.java-version ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/wrapper/.jenv-version ']'
+ root=/Users/michaelpridemore/Documents/test/gradle
+ '[' -n /Users/michaelpridemore/Documents/test/gradle ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/.java-version ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/.jenv-version ']'
+ root=/Users/michaelpridemore/Documents/test
+ '[' -n /Users/michaelpridemore/Documents/test ']'
+ '[' -e /Users/michaelpridemore/Documents/test/.java-version ']'
+ echo /Users/michaelpridemore/Documents/test/.java-version
+ exit
+ JENV_VERSION_FILE=/Users/michaelpridemore/Documents/test/.java-version
++ jenv-version-file-read /Users/michaelpridemore/Documents/test/.java-version
+ set -e
+ '[' -n 1 ']'
+ set -x
+ VERSION_FILE=/Users/michaelpridemore/Documents/test/.java-version
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'
++ true
+ JENV_VERSION=
+ '[' -z '' ']'
+ echo system
+ exit
+ export JENV_VERSION=system
+ JENV_VERSION=system
+ JENV_COMMAND=java
++ jenv-options
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' -z '' ']'
++ jenv-options-file
+ set -e
+ '[' -n 1 ']'
+ set -x
+ find_local_version_file /Users/michaelpridemore/Documents/test/gradle/wrapper
+ local root=/Users/michaelpridemore/Documents/test/gradle/wrapper
+ '[' -n /Users/michaelpridemore/Documents/test/gradle/wrapper ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/wrapper/.java-options ']'
+ root=/Users/michaelpridemore/Documents/test/gradle
+ '[' -n /Users/michaelpridemore/Documents/test/gradle ']'
+ '[' -e /Users/michaelpridemore/Documents/test/gradle/.java-options ']'
+ root=/Users/michaelpridemore/Documents/test
+ '[' -n /Users/michaelpridemore/Documents/test ']'
+ '[' -e /Users/michaelpridemore/Documents/test/.java-options ']'
+ root=/Users/michaelpridemore/Documents
+ '[' -n /Users/michaelpridemore/Documents ']'
+ '[' -e /Users/michaelpridemore/Documents/.java-options ']'
+ root=/Users/michaelpridemore
+ '[' -n /Users/michaelpridemore ']'
+ '[' -e /Users/michaelpridemore/.java-options ']'
+ root=/Users
+ '[' -n /Users ']'
+ '[' -e /Users/.java-options ']'
+ root=
+ '[' -n '' ']'
+ '[' /Users/michaelpridemore/Documents/test/gradle/wrapper = /Users/michaelpridemore/Documents/test ']'
+ find_local_version_file /Users/michaelpridemore/Documents/test
+ local root=/Users/michaelpridemore/Documents/test
+ '[' -n /Users/michaelpridemore/Documents/test ']'
+ '[' -e /Users/michaelpridemore/Documents/test/.java-options ']'
+ root=/Users/michaelpridemore/Documents
+ '[' -n /Users/michaelpridemore/Documents ']'
+ '[' -e /Users/michaelpridemore/Documents/.java-options ']'
+ root=/Users/michaelpridemore
+ '[' -n /Users/michaelpridemore ']'
+ '[' -e /Users/michaelpridemore/.java-options ']'
+ root=/Users
+ '[' -n /Users ']'
+ '[' -e /Users/.java-options ']'
+ root=
+ '[' -n '' ']'
+ global_version_file=/usr/local/var/jenv/options
+ '[' -e /usr/local/var/jenv/options ']'
+ echo /usr/local/var/jenv/options
+ JENV_OPTIONS_FILE=/usr/local/var/jenv/options
++ jenv-options-file-read /usr/local/var/jenv/options
+ set -e
+ '[' -n 1 ']'
+ set -x
+ OPTIONS_FILE=/usr/local/var/jenv/options
+ '[' -e /usr/local/var/jenv/options ']'
+ exit 1
++ true
+ JENV_OPTIONS=
+ '[' -z '' ']'
+ echo ''
+ exit
+ export JENV_OPTIONS=
+ JENV_OPTIONS=
+ export JAVA_HOME=/usr/local/var/jenv/versions/system
+ JAVA_HOME=/usr/local/var/jenv/versions/system
+ '[' -z java ']'
++ jenv-which java
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' java = --complete ']'
++ jenv-version-name
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' -z system ']'
+ '[' -z system ']'
+ '[' system = system ']'
+ echo system
+ exit
+ JENV_VERSION=system
+ JENV_COMMAND=java
+ '[' -z java ']'
+ '[' system = system ']'
++ remove_from_path /usr/local/var/jenv/shims
+++ expand_path /usr/local/var/jenv/shims
+++ '[' '!' -d /usr/local/var/jenv/shims ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/var/jenv/shims
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ local path_to_remove=/usr/local/var/jenv/shims
++ local result=
++ '[' -z /usr/local/var/jenv/shims ']'
++ local paths
++ IFS=:
++ paths=($PATH)
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/Cellar/jenv/0.5.4/libexec/libexec
+++ '[' '!' -d /usr/local/Cellar/jenv/0.5.4/libexec/libexec ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/Cellar/jenv/0.5.4/libexec/libexec
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/Cellar/jenv/0.5.4/libexec/libexec
++ '[' -n /usr/local/Cellar/jenv/0.5.4/libexec/libexec ']'
++ '[' /usr/local/Cellar/jenv/0.5.4/libexec/libexec '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:
++ for path in '"${paths[@]}"'
+++ expand_path /Users/michaelpridemore/.pyenv/shims
+++ '[' '!' -d /Users/michaelpridemore/.pyenv/shims ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /Users/michaelpridemore/.pyenv/shims
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/Users/michaelpridemore/.pyenv/shims
++ '[' -n /Users/michaelpridemore/.pyenv/shims ']'
++ '[' /Users/michaelpridemore/.pyenv/shims '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:
++ for path in '"${paths[@]}"'
+++ expand_path /Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin
+++ '[' '!' -d /Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin
++ '[' -n /Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin ']'
++ '[' /Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/var/jenv/shims
+++ '[' '!' -d /usr/local/var/jenv/shims ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/var/jenv/shims
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/var/jenv/shims
++ '[' -n /usr/local/var/jenv/shims ']'
++ '[' /usr/local/var/jenv/shims '!=' /usr/local/var/jenv/shims ']'
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/opt/[email protected]/bin
+++ '[' '!' -d /usr/local/opt/[email protected]/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/opt/[email protected]/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/opt/[email protected]/bin
++ '[' -n /usr/local/opt/[email protected]/bin ']'
++ '[' /usr/local/opt/[email protected]/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /Users/michaelpridemore/Applications/bin
+++ '[' '!' -d /Users/michaelpridemore/Applications/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /Users/michaelpridemore/Applications/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/Users/michaelpridemore/Applications/bin
++ '[' -n /Users/michaelpridemore/Applications/bin ']'
++ '[' /Users/michaelpridemore/Applications/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/sbin
+++ '[' '!' -d /usr/local/sbin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/sbin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/sbin
++ '[' -n /usr/local/sbin ']'
++ '[' /usr/local/sbin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/bin
+++ '[' '!' -d /usr/local/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/bin
++ '[' -n /usr/local/bin ']'
++ '[' /usr/local/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/bin
+++ '[' '!' -d /usr/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/bin
++ '[' -n /usr/bin ']'
++ '[' /usr/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /bin
+++ '[' '!' -d /bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/bin
++ '[' -n /bin ']'
++ '[' /bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/sbin
+++ '[' '!' -d /usr/sbin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/sbin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/sbin
++ '[' -n /usr/sbin ']'
++ '[' /usr/sbin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:
++ for path in '"${paths[@]}"'
+++ expand_path /sbin
+++ '[' '!' -d /sbin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /sbin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/sbin
++ '[' -n /sbin ']'
++ '[' /sbin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
++ for path in '"${paths[@]}"'
+++ expand_path /Library/Apple/usr/bin
+++ '[' '!' -d /Library/Apple/usr/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /Library/Apple/usr/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/Library/Apple/usr/bin
++ '[' -n /Library/Apple/usr/bin ']'
++ '[' /Library/Apple/usr/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /usr/local/opt/[email protected]/bin
+++ '[' '!' -d /usr/local/opt/[email protected]/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /usr/local/opt/[email protected]/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/usr/local/opt/[email protected]/bin
++ '[' -n /usr/local/opt/[email protected]/bin ']'
++ '[' /usr/local/opt/[email protected]/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:
++ for path in '"${paths[@]}"'
+++ expand_path /Users/michaelpridemore/.local/bin
+++ '[' '!' -d /Users/michaelpridemore/.local/bin ']'
++++ pwd
+++ local cwd=/Users/michaelpridemore/Documents/test
+++ cd /Users/michaelpridemore/.local/bin
+++ pwd
+++ cd /Users/michaelpridemore/Documents/test
++ path=/Users/michaelpridemore/.local/bin
++ '[' -n /Users/michaelpridemore/.local/bin ']'
++ '[' /Users/michaelpridemore/.local/bin '!=' /usr/local/var/jenv/shims ']'
++ result=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/.local/bin:
++ echo /usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/.local/bin
+ PATH=/usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/michaelpridemore/.pyenv/shims:/Users/michaelpridemore/.nvm/versions/node/v10.15.3/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/Applications/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/opt/[email protected]/bin:/Users/michaelpridemore/.local/bin
++ command -v java
+ JENV_COMMAND_PATH=/usr/bin/java
++ jenv-hooks which
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' which = --complete ']'
+ JENV_COMMAND=which
+ '[' -z which ']'
+ shell=
+ '[' -z ']'
+ shell=bash
+ shopt -s nullglob
+ shopt -u nullglob
+ '[' -x /usr/bin/java ']'
+ echo /usr/bin/java
+ JENV_COMMAND_PATH=/usr/bin/java
+ JENV_BIN_PATH=/usr/bin
++ jenv-hooks exec
+ set -e
+ '[' -n 1 ']'
+ set -x
+ '[' exec = --complete ']'
+ JENV_COMMAND=exec
+ '[' -z exec ']'
+ shell=
+ '[' -z ']'
+ shell=bash
+ shopt -s nullglob
+ shopt -u nullglob
+ shift 1
+ '[' system '!=' system ']'
+ exec -a java /usr/bin/java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/michaelpridemore/Documents/test/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/michaelpridemore/Documents/test/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain

> Task :help

Welcome to Gradle 4.10.3.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed

Notice it seemed to work.

Ironically, if I do the same test but don't turn on debugging, I still see the error:

ATL-MPRIDEMORE2 (AWS:default) [Documents]
$ gng wrapper -v 4.10.3 -d test
 Installing Gradle Wrapper in test. (version=4.10.3, distributionType=all, mirrorUrl=<Not Specified>)

ATL-MPRIDEMORE2 (AWS:default) [Documents]
$ cd test
ATL-MPRIDEMORE2 (AWS:default) [test]
$ jenv local 1.8
ATL-MPRIDEMORE2 (AWS:default) [test]
$ gw
/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'

> Task :help

Welcome to Gradle 4.10.3.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed

@socket70
Copy link
Author

Hey @dantesun, any new updates on this?

@dantesun
Copy link
Member

dantesun commented Apr 29, 2021

Hey @dantesun, any new updates on this?

Unfortunately I fail to spot the issue. jenv's code is complex and hard to debug. But I will keep this on mind.

Personally I use sdkman (https://sdkman.io/) and direnv(https://direnv.net/). It could be an alternative solution for you. sdkman will help you maintain multiple versions of jdk and direnv is a generic tool help you setup environment per directory.

@gtassone
Copy link

i resolved this by running

jenv enable-plugin gradle
jenv enable-plugin export

related jenv issue

@csarmiento
Copy link

i resolved this by running


jenv enable-plugin gradle

jenv enable-plugin export

related jenv issue

It works! @dantesun I think you can close the issue, and maybe document it in the README.

@socket70
Copy link
Author

Yep this seems to sol e it for me as well. Thanks @gtassone.

@socket70
Copy link
Author

socket70 commented Sep 2, 2021

I spoke too soon.

I tried to build another project today and it failed with the same error as before

/usr/local/Cellar/jenv/0.5.4/libexec/libexec/jenv-version-file-read: line 17: syntax error near unexpected token `<'

It caused the build to fail because of missing dependency

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

It seems the error causes java to bail out prior to loading all dependencies

Running ./gradlew directly or installing the deprecated gdub works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants