父模块设置让子模块统一jdk
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SolaSecurity</groupId>
<artifactId>security</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>solatest</module>
</modules>
</project>
另外,在一般的工程中定义当前项目所用的jdk版本
<properties>
<...> ...<...>
<java.version>1.8</java.version>
<...> ...<...>
</properties>
这个properties属性配置一般配置在<parent>标签之后,如果引用了自己公司的框架,应该在框架内就有定义版本,则不需引入,总之,按需要进行设置。设置之后可以在编译插件中引入即可