Maven doesn't recognize the java_home path provide by $JAVA_HOME variable even though it clearly points to a valid installation.
i cant compile the project i want with this command when i'm located on the same directory as the pom.xml folder.
$ mvn package
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
if i want to check the version, same thing :
$ mvn -versionThe 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
but the $JAVA_HOME is correctly set-up as i can see
$ echo $JAVA_HOME/usr/lib/jvm/jdk-10.0.10
here are some info about my java installation
$ which java/usr/bin/java
$readlink -f /usr/bin/java/usr/lib/jvm/java-11-openjdk-amd64/bin/java