I\'m trying to use maven to build a jar but I keep getting the error
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(d
As a MacOS user, open a Terminal
and create or edit a file .bash_profile
(in the directory of your user home) and put the following snippet there:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Save that file and reopen a Terminal instance. If you execute export
as a command there, you should see a valid JAVA_HOME
with the location of your JDK 8 installation. Restart your IDE afterwards and maven should be able to build you nice java target 1.8
code.