maven Intellij IDEA修改默认 Target bytecode version

问题现象:使用Intellij IDEA 2017.2 新建web项目,使用jdk1.8版本,应设置好Target bytecode version,Language level为1.8。但是,每次新加一个module,所有的设置都变成默认的1.5。
//所以需要修改pom.xml文件

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

猜你喜欢

转载自ztao2333.iteye.com/blog/2386527