$ asdf exec mvn
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Debugging
++ source /home/sirianni/.asdf/plugins/maven/bin/exec-env
+++ asdf current java
++++ asdf where java
+++ export 'JAVA_HOME=System version is selected'
+++ JAVA_HOME='System version is selected'
It appears that this code be using should skip execution if the system version is in use.
#!/usr/bin/env bash
# if asdf provides java, then let's use that rather the system one (if at all avail)
if asdf current java > /dev/null 2>&1
then
export JAVA_HOME=$(asdf where java)
fi
Debugging
It appears that this code be using should skip execution if the system version is in use.