[英]Intelij IDEA - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
I'm using java 7 to compile my class files using maven /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java
, but still i'm getting below errors. 我正在使用java 7使用maven
/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java
编译我的类文件,但仍然遇到错误。 What might i be doing wrong ? 我可能做错了什么?
Compilation failure:
error: generics are not supported in -source 1.3
error: annotations are not supported in -source 1.3
IntelliJ preference > Java > Compiler > Set language level to 1.7
IntelliJ首选项> Java>编译器>将语言级别设置为
1.7
Project > properties > Project language level > Set language level to 1.7
项目>属性>项目语言级别>将语言级别设置为
1.7
You have change your pom file: 您已经更改了pom文件:
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.