- Maven多模块结构统一设置jdk
需要设置setting.xml配置文件,具体内容如下:
<profiles>
<profile>
<id>jdk1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
这样能够解决项目设置jdk版本,然后update-maven后还原成原来jdk版本问题,配置文件里面涉及到的jdk的版本可自定义其他jdk版本号。