maven 配置jdk版本

1.pom.xml文件配置
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>

 2.setting.xml文件配置

<profile>
  <id>jdk-1.7</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>

 

posted @ 2015-05-17 07:33  探讨  阅读(405)  评论(0编辑  收藏  举报