maven 添加支持编译jdk1.7

 1.在<profiles>元素内增加如下内容
   <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>

2.在<activeProfiles> 元素内增加<activeProfile>jdk17</activeProfile> 
posted @ 2014-11-07 17:36  飞叶-枯寂  阅读(512)  评论(0编辑  收藏  举报