IDEA maven 项目打包 jdk版本问题

作者: YoRuo_ | 来源:发表于2016-12-13 16:53 被阅读1118次

之前在使用Maven构建的项目中打包总是报错。
本机是 jdk1.7.0_79

打包确是1.5

那么要在 setting.xmlprofiles 节点中加这么一段配置

<profile> 
  <id>jdk17</id>  
  <activation> 
    <activeByDefault>true</activeByDefault>  
    <jdk>1.7</jdk> 
  </activation>  
  <properties> 
    <maven.compiler.source>1.7</maven.compiler.source>  
    <maven.compiler.target>1.7</maven.compiler.target>  
    <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> 
  </properties> 
</profile>

在IDEA 勾选上这个

勾选

再执行编译即可

欢迎光临我的个人博客

相关文章

网友评论

    本文标题:IDEA maven 项目打包 jdk版本问题

    本文链接:https://www.haomeiwen.com/subject/cgrbmttx.html