[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project scratch: Compilation failure [ERROR] /home/projects/java/scratch/src/main/java/com/test/MavenCompileTest.java:[50,26] error: for-each loops are not supported in -source 1.3
To resolve this problem, you need to specify the compiler plugin version and the Java -source and -target versions in the pom.xml of your project as below:
org.apache.maven.plugins maven-compiler-plugin 3.1 1.7
You can figure out the latest version of the Compiler Plugin by reading the version number on the top right of the Compiler Plugin page.
No comments:
Post a Comment