1.5不支持diamond运算符,请使用source 7或更高版本以启用diamond运算符
2017-09-01 18:06
423 查看
参考链接:https://www.zhihu.com/question/56949122
maven打包总是不成功,模板类项目中加入模板类总是打包不成功,回来再找了同事,发下了这个问题,又在往上找下同意的问题,有大牛的答案是这样的
1. 直接在pom.xml中配置Maven的编译插件也是可以的,类似下面这样:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
但是在我的eclipse上 还是有报错。
我现在了第二种:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
成功!
maven打包总是不成功,模板类项目中加入模板类总是打包不成功,回来再找了同事,发下了这个问题,又在往上找下同意的问题,有大牛的答案是这样的
1. 直接在pom.xml中配置Maven的编译插件也是可以的,类似下面这样:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
但是在我的eclipse上 还是有报错。
我现在了第二种:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
成功!
相关文章推荐
- 关于Maven installed出现source 1.5 中不支持 diamond 运算符问题(请使用 -source 7 或更高版本以启用 diamond 运算符)
- 1.5不支持diamond运算符,请使用source 7或更高版本以启用diamond运算符,怎么办?
- java: -source 1.5 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 错误:-source 1.5 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- -source 1.5 中不支持 diamond 运算符 [ERROR] (请使用 -source 7 或更高版本以启用 diamond 运算符)
- Maven install时抛出“1.5不支持diamond运算符,请使用source 7或更高版本以启用diamond运算符”
- 1.5不支持diamond运算符,请使用source 7或更高版本以启用diamond运算符
- Error:(54, 61) 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 安卓学习笔记---使用AndroidStudio出现的问题错误(错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算)
- Idea报错source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 异常: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 兔子--Error:(88, 35) 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- Error:(70, 41) 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- Error:(54, 61) 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)
- 运行开源项目,报错Error:(48, 37) 错误: -source 1.6 中不支持 diamond 运算符,请使用-source 7或者更高版本已启用diamond运算符
- 错误: -source 1.6 中不支持 diamond 运算符 (请使用 -source 7 或更高版本以启用 diamond 运算符)