<分区>
我在项目中使用 Java 7 语法,但是当我转到 mvn clean install 时,maven 告诉我:
[ERROR] /Users/mosawi/Perforce/src/main/java/com/generalatomics/compilers/Engine.java:[47,45] diamond operator is not supported in -source 1.5
[ERROR] (use -source 7 or higher to enable diamond operator)
我很确定我的项目是 Java 7,我的 java 构建路径设置为 Java 7
编辑:
这是关于我的 pom.xml 的相关信息 ...等等
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
<configuration>
<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
</plugin>
</plugins>
</reporting>
...等等