pan*_*001 2 java maven-2 maven maven-compiler-plugin
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project mrlda: Compilation failure: Compilation failure:
[ERROR] /home/panwar/Downloads/Mr.LDA-master/src/main/java/cc/mrlda/polylda/TermReducer.java:[24,11] error: generics are not supported in -source 1.3
[ERROR]
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] /home/panwar/Downloads/Mr.LDA-master/src/main/java/cc/mrlda/TermReducer.java:[33,11] error: generics are not supported in -source 1.3
Run Code Online (Sandbox Code Playgroud)
我正在使用最新版本的java.
解决了:问题出在maven身上.我使用的是旧版本(maven3.0.2)其他东西都是正确的.
您编译java 1.3的代码并使用java 1.5中引入的泛型.您必须更改为java 1.5或更高版本.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20281 次 |
| 最近记录: |