This is an automated email from the ASF dual-hosted git repository. johnnyv pushed a commit to branch 2.2.X in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/2.2.X by this push: new a4f0b28 Forces code compatibility with JDK8 a4f0b28 is described below commit a4f0b286b16c773838a881db2c376bda26353658 Author: Jonathan Valliere <john...@apache.org> AuthorDate: Tue Nov 23 21:20:13 2021 -0500 Forces code compatibility with JDK8 --- pom.xml | 73 ++++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index a641b35..69a69aa 100644 --- a/pom.xml +++ b/pom.xml @@ -158,6 +158,9 @@ <!-- OSGi minimum versions --> <osgi-min-version.slf4j.api>1.7</osgi-min-version.slf4j.api> + + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> </properties> <modules> @@ -390,34 +393,42 @@ </modules> </profile> - <profile> - <id>apache-release</id> - - <build> - <plugins> - <plugin> - <artifactId>maven-javadoc-plugin</artifactId> - <executions> - <execution> - <phase>install</phase> - - <goals> - <goal>javadoc</goal> - </goals> - <configuration> - <aggregate>true</aggregate> - <!-- additionalparam>-Xdoclint:none</additionalparam --> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <modules> - <module>distribution</module> - </modules> - </profile> + <profile> + <id>apache-release</id> + <build> + <plugins> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <phase>install</phase> + <goals> + <goal>javadoc</goal> + </goals> + <configuration> + <aggregate>true</aggregate> + <!-- additionalparam>-Xdoclint:none</additionalparam --> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <modules> + <module>distribution</module> + </modules> + </profile> + + <!-- use JDK8 compilation for JDK9+ compiler --> + <profile> + <id>java-8-compilation</id> + <activation> + <jdk>[9,)</jdk> + </activation> + <properties> + <maven.compiler.release>8</maven.compiler.release> + </properties> + </profile> </profiles> @@ -460,9 +471,7 @@ <artifactId>maven-compiler-plugin</artifactId> <version>${version.compiler.plugin}</version> <configuration> - <source>1.8</source> - <target>1.8</target> - <optimize>true</optimize> + <optimize>true</optimize> <showDeprecation>true</showDeprecation> <encoding>ISO-8859-1</encoding> </configuration> @@ -788,8 +797,6 @@ <artifactId>maven-compiler-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> - <source>1.7</source> - <target>1.7</target> <debug>true</debug> <optimize>true</optimize> <showDeprecations>true</showDeprecations>