This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch JDK9 in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/JDK9 by this push: new 3244fc9 Allow the build to pass (including tests) with JDK 9 and JDK 10. The project is not yet modularized however. 3244fc9 is described below commit 3244fc9f4c03b84d6bddece6737af2b4ea554224 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sat Aug 11 13:25:43 2018 +0200 Allow the build to pass (including tests) with JDK 9 and JDK 10. The project is not yet modularized however. --- core/sis-build-helper/pom.xml | 3 +++ .../projection/ObliqueStereographicTest.java | 2 +- pom.xml | 30 ++++++++++++++++++---- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/core/sis-build-helper/pom.xml b/core/sis-build-helper/pom.xml index 099abc2..47f822a 100644 --- a/core/sis-build-helper/pom.xml +++ b/core/sis-build-helper/pom.xml @@ -91,6 +91,9 @@ <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArgs> + <!-- As of August 2018, we can not yet moduralize Maven plugins because the Maven dependencies are + themselves not modularized. Attempts to use them as unnamed modules cause package conflicts. + We have to workaround by adding dependencies on the command-line instead. --> <arg>--add-modules</arg> <arg>jdk.javadoc</arg> </compilerArgs> </configuration> diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueStereographicTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueStereographicTest.java index 0109365..06d88b2 100644 --- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueStereographicTest.java +++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueStereographicTest.java @@ -266,7 +266,7 @@ public final strictfp class ObliqueStereographicTest extends MapProjectionTestCa dstPts[1] += FN; // Use a smaller tolerance because spherical and elliptical formulas should be equivalent in this case. - assertArrayEquals("Spherical projection", refPts, dstPts, Formulas.ANGULAR_TOLERANCE / 1E6); + assertArrayEquals("Spherical projection", refPts, dstPts, Formulas.LINEAR_TOLERANCE / 1E4); } /** diff --git a/pom.xml b/pom.xml index e602f3b..5ec6e73 100644 --- a/pom.xml +++ b/pom.xml @@ -510,8 +510,8 @@ <website.locale>en</website.locale> <!-- Following properties are branch-specific --> - <maven.compile.source>9</maven.compile.source> - <maven.compile.target>9</maven.compile.target> + <maven.compiler.source>9</maven.compiler.source> + <maven.compiler.target>9</maven.compiler.target> <sis.plugin.version>${project.version}</sis.plugin.version> <sis.non-free.version>0.8</sis.non-free.version> <geoapi.version>4.0-SNAPSHOT</geoapi.version> @@ -561,14 +561,33 @@ ============================================================== --> <build> <plugins> + <!-- JDK requirement for building (not necessarily for running) --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireJavaVersion> + <version>${maven.compiler.target}</version> + </requireJavaVersion> + </rules> + </configuration> + </execution> + </executions> + </plugin> <!-- Compile --> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> - <source>${maven.compile.source}</source> - <target>${maven.compile.target}</target> + <release>${maven.compiler.target}</release> <encoding>${project.build.sourceEncoding}</encoding> <useIncrementalCompilation>false</useIncrementalCompilation> <!-- https://jira.codehaus.org/browse/MCOMPILER-209 --> <compilerArgs> @@ -595,6 +614,7 @@ <value>${project.build.directory}/derby.log</value> </property> </systemProperties> + <argLine>--add-modules java.xml.bind,java.xml.ws.annotation,javafx.graphics</argLine> </configuration> </plugin> @@ -764,7 +784,7 @@ <artifactId>maven-javadoc-plugin</artifactId> <version>3.0.1</version> <configuration> - <source>${maven.compile.source}</source> <!-- Enables javadoc to handle language constructs present in target JDK. --> + <source>${maven.compiler.source}</source> <!-- Enables javadoc to handle language constructs present in target JDK. --> <encoding>${project.build.sourceEncoding}</encoding> <!-- Encoding of Java source file. --> <docencoding>${website.encoding}</docencoding> <!-- Encoding of the generated HTML files. --> <charset>${website.encoding}</charset> <!-- Encoding to declare in the HTML META tag. -->