1. 程式人生 > >-source 1.5 中不支持泛型(請使用-source5或更高版本)

-source 1.5 中不支持泛型(請使用-source5或更高版本)

報錯 compile ext col 個人 width -1 目的 itl

Idea中maven--compile時報錯 -source 1.5 中不支持泛型(請使用-source5或更高版本)

解決辦法

在項目的pom.xml中,添加

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>

原因:個人感覺pom.xml缺少了maven的一些插件
技術分享

 

-source 1.5 中不支持泛型(請使用-source5或更高版本)