I'm running a Java Maven project on IntelliJ, and I make sure that this project will be compiled by Java 1.8.
I set JRE to version 8 in Run/Debug Configuration
and also in Project Structure:
My pom.xml file also includes java version 8 by the following:
1.8
1.8
and
org.apache.maven.plugins
maven-compiler-plugin
3.1
1.8
1.8
I also set Java compiler option to version 1.8.
When I run the project, I get an error:
Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile
(default-compile) on project feed_matcher: Fatal error compiling:
invalid target release: 1.8 -> [Help 1]
Do you know how to resolve this issue?
P.S I followed this link: IDEA: javac: source release 1.7 requires target release 1.7 and I still couldn't resolve the problem.
解决方案
Look in Build Execution, Deployment > Compiler > Java Compiler
Then look for per module bytecode version