I have Java version 1.8.111 installed and the initial error message after running mvn3 install
was as below.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project myfile: Cannot find matching toolchain definitions for the following toolchain types:
[ERROR] jdk [ vendor='sun' version='1.6' ]
[ERROR] Please make sure you define the required toolchains in your ~/.m2/toolchains.xml file.
To resolved this, I've updated my toolchains.xml to version 1.8.111 but still getting the same error. I've also tried after running mvn3 clean
and successfully cleaned but still getting the same error.
Could anyone pinpoint where this version 1.6 is fetched from? I checked JAVA_HOME already, it's set to 1.8.
Can anyone explain how maven calls Java version?
Appreciate your help.