I'm following a PluralSight course, "Spring Framework: Spring Fundamentals" by Bryan Hansen. I've followed the demo precisely (I believe) but am getting the error message "Error:java: Source option 5 is no longer supported. Use 6 or later.".
I'm using the latest version of IntelliJ, with the following configurations:
- Under "Preferences > Build, Execution, Deployment > Compiler > Java Compiler" I have the project bytecode version set to Java 11 and the per-module bytecode version to "Same as language level".
- Under "File > Project Structure > Project" I have the project SDK set to 11 and project language level set to 11 as well.
- Have my pom.xml with the following build settings:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>
I've looked at some other similar posts, and they seem to sometimes have the above configuration as 1.6 instead of 11, but I'm trying to follow this tutorial closely. Am still curious as to the discrepancy here.
Not sure what's casuing this error to be thrown, as far as I can tell I've got everything set up correctly but clearly that's not the case. Any help would be appreciated.