I am having problem compiling my tests with Java 8 on a Windows machine. When I compile and run tests within IntelliJ IDE there is no problem, but when I compile on the command line, I get a "Fatal error compiling: invalid target release: 1.8"
This works just fine:
> mvn clean compile
This fails:
> mvn clean test-compile
My pom.xml includes the following compiler plugin configuration:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
I have the correct java version:
> java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Any help would be much appreciated.
mvn --version? - jmj