Merge pull request #42 from mthmulders/grammar

Grammar on 'Compiling Sources Using A Different JDK' page
diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..8f576f2
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,25 @@
+# 
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+# 
+#       http://www.apache.org/licenses/LICENSE-2.0
+# 
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+# see https://s.apache.org/asfyaml
+github:
+  description: "Apache Maven Compiler Plugin"
+  homepage: https://maven.apache.org/plugins/maven-compiler-plugin/
+  labels:
+    - java
+    - build-management
+    - maven-plugins
+    - maven
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..d5e65c5
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Java CI
+
+on: [push, pull_request]
+
+jobs:
+  build:
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest,windows-latest, macOS-latest]
+        java: [8, 11, 14, 15]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Set up cache for ~./m2/repository
+        uses: actions/cache@v2.1.1
+        with:
+          path: ~/.m2/repository
+          key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            maven-${{ matrix.os }}-java${{ matrix.java }}-
+            maven-${{ matrix.os }}-
+
+      - name: Set up JDK
+        uses: actions/setup-java@v1
+        with:
+          java-version: ${{ matrix.java }}
+
+      - name: Build with Maven
+        run: mvn install javadoc:javadoc -e -B -V -Prun-its
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index c5741e2..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,91 +0,0 @@
-<!---
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-Contributing to Apache Compiler Plugin
-======================
-
-You have found a bug or you have an idea for a cool new feature? Contributing
-code is a great way to give something back to the open source community. Before
-you dig right into the code, there are a few guidelines that we need
-contributors to follow so that we can have a chance of keeping on top of
-things.
-
-Some of the ideas are documented in the [Maven Wiki][maven-wiki]
-which might be interesting to read and for further discussion.
-
-Getting Started
----------------
-
-+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
-+ Make sure you have a [GitHub account](https://github.com/signup/free).
-+ If you're planning to implement a new feature, it makes sense to discuss your changes 
-  on the [dev list](https://maven.apache.org/mail-lists.html) first. 
-  This way you can make sure you're not wasting your time on something that isn't 
-  considered to be in Apache Maven's scope.
-+ Submit a ticket for your issue, assuming one does not already exist.
-  + Clearly describe the issue, including steps to reproduce when it is a bug.
-  + Make sure you fill in the earliest version that you know has the issue.
-+ Fork the repository on GitHub.
-
-Making and Submitting Changes
---------------
-
-We accept Pull Requests via GitHub. The [developer mailing list][dev-ml-list] is the
-main channel of communication for contributors.  
-There are some guidelines which will make applying PRs easier for us:
-+ Create a topic branch from where you want to base your work (this is usually the master branch).
-  Push your changes to a topic branch in your fork of the repository.
-+ Make commits of logical units.
-+ Respect the original code style: by using the same [codestyle][code-style],
-  patches should only highlight the actual difference, not being disturbed by any formatting issues:
-  + Only use spaces for indentation.
-  + Create minimal diffs - disable on save actions like reformat source code or organize imports. 
-    If you feel the source code should be reformatted, create a separate PR for this change.
-  + Check for unnecessary whitespace with `git diff --check` before committing.
-+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
-```
-[MCOMPILER-XXX] - Subject of the JIRA Ticket
- Optional supplemental description.
-```
-+ Make sure you have added the necessary tests (JUnit/IT) for your changes.
-+ Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken.
-+ Submit a pull request to the repository in the Apache organization.
-+ Update your JIRA ticket and include a link to the pull request in the ticket.
-
-If you plan to contribute on a regular basis, please consider filing a [contributor license agreement][cla].
-
-Making Trivial Changes
-----------------------
-
-For changes of a trivial nature to comments and documentation, it is not always
-necessary to create a new ticket in JIRA.  In this case, it is appropriate to
-start the first line of a commit with '(doc)' instead of a ticket number.
-
-Additional Resources
---------------------
-
-+ [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch)
-+ [Apache Maven Help JIRA project page](https://issues.apache.org/jira/projects/MPH/)
-+ [Contributor License Agreement][cla]
-+ [General GitHub documentation](https://help.github.com/)
-+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
-+ [Apache Maven Twitter Account](https://twitter.com/ASFMavenProject)
-+ #Maven IRC channel on freenode.org
-
-[dev-ml-list]: http://maven.apache.org/mailing-lists.html
-[code-style]: https://maven.apache.org/developers/conventions/code.html
-[cla]: https://www.apache.org/licenses/#clas
-[maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index
diff --git a/README.md b/README.md
index f828bf7..d70ce5c 100644
--- a/README.md
+++ b/README.md
@@ -14,13 +14,14 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-Contributing to Apache Compiler Plugin
+Contributing to [Apache Maven Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-plugin/)
 ======================
 
+[![ASF Jira](https://img.shields.io/endpoint?url=https%3A%2F%2Fmaven.apache.org%2Fbadges%2Fasf_jira-MCOMPILER.json)][jira]
 [![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license]
-[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.plugins/maven-compiler-plugin.svg?label=Maven%20Central)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven.plugins%22%20AND%20a%3A%22maven-compiler-plugin%22)
-[![Jenkins Status](https://img.shields.io/jenkins/s/https/builds.apache.org/job/maven-box/job/maven-compiler-plugin/job/master.svg?style=flat-square)][build]
-[![Jenkins tests](https://img.shields.io/jenkins/t/https/builds.apache.org/job/maven-box/job/maven-compiler-plugin/job/master.svg?style=flat-square)][test-results]
+[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.plugins/maven-compiler-plugin.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.plugins/maven-compiler-plugin)
+[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/job/master.svg?)][build]
+[![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/job/master.svg?)][test-results]
 
 
 You have found a bug or you have an idea for a cool new feature? Contributing
@@ -35,7 +36,7 @@
 + Make sure you have a [JIRA account](https://issues.apache.org/jira/).
 + Make sure you have a [GitHub account](https://github.com/signup/free).
 + If you're planning to implement a new feature, it makes sense to discuss your changes 
-  on the [dev list](https://maven.apache.org/mail-lists.html) first. 
+  on the [dev list][ml-list] first. 
   This way you can make sure you're not wasting your time on something that isn't 
   considered to be in Apache Maven's scope.
 + Submit a ticket for your issue, assuming one does not already exist.
@@ -46,7 +47,7 @@
 Making and Submitting Changes
 --------------
 
-We accept Pull Requests via GitHub. The [developer mailing list][dev-ml-list] is the
+We accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the
 main channel of communication for contributors.  
 There are some guidelines which will make applying PRs easier for us:
 + Create a topic branch from where you want to base your work (this is usually the master branch).
@@ -81,17 +82,18 @@
 --------------------
 
 + [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch)
-+ [Apache Maven Help JIRA project page](https://issues.apache.org/jira/projects/MCOMPILER/)
++ [Apache Maven Compiler JIRA project page][jira]
 + [Contributor License Agreement][cla]
 + [General GitHub documentation](https://help.github.com/)
 + [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
 + [Apache Maven Twitter Account](https://twitter.com/ASFMavenProject)
 + #Maven IRC channel on freenode.org
 
+[jira]: https://issues.apache.org/jira/projects/MCOMPILER/
 [license]: https://www.apache.org/licenses/LICENSE-2.0
-[dev-ml-list]: http://maven.apache.org/mailing-lists.html
+[ml-list]: http://maven.apache.org/mailing-lists.html
 [code-style]: https://maven.apache.org/developers/conventions/code.html
 [cla]: https://www.apache.org/licenses/#clas
 [maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index
-[test-results]: https://builds.apache.org/job/maven-box/job/maven-compiler-plugin/job/master/lastCompletedBuild/testReport/
-[build]: https://builds.apache.org/job/maven-box/job/maven-compiler-plugin/job/master/
+[test-results]: https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/job/master/lastCompletedBuild/testReport/
+[build]: https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/job/master/
diff --git a/pom.xml b/pom.xml
index 863192b..61d8215 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,12 +25,12 @@
   <parent>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-plugins</artifactId>
-    <version>33</version>
-    <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
+    <version>34</version>
+    <relativePath/>
   </parent>
 
   <artifactId>maven-compiler-plugin</artifactId>
-  <version>3.8.2-SNAPSHOT</version>
+  <version>3.9.0-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
 
   <name>Apache Maven Compiler Plugin</name>
@@ -53,7 +53,7 @@
   </issueManagement>
   <ciManagement>
     <system>Jenkins</system>
-    <url>https://builds.apache.org/job/maven-box/job/maven-compiler-plugin/</url>
+    <url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/</url>
   </ciManagement>
   <distributionManagement>
     <site>
@@ -68,13 +68,15 @@
       ! The following property is used in the integration tests MCOMPILER-157
     -->
     <mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
-    <plexusCompilerVersion>2.8.4</plexusCompilerVersion>
+    <plexusCompilerVersion>2.8.8</plexusCompilerVersion>
     <groovyVersion>1.8.0</groovyVersion>
     <groovyEclipseCompilerVersion>2.7.0-01</groovyEclipseCompilerVersion>
     <groovy-eclipse-batch>2.0.4-04</groovy-eclipse-batch>
     <openJpaVersion>2.4.2</openJpaVersion>
+    <plexus-java.version>1.0.4</plexus-java.version>
     <javaVersion>7</javaVersion>
     <maven.it.failure.ignore>false</maven.it.failure.ignore>
+    <project.build.outputTimestamp>2020-04-07T21:04:00Z</project.build.outputTimestamp>
   </properties>
 
   <contributors>
@@ -129,7 +131,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-java</artifactId>
-      <version>0.9.10</version>
+      <version>${plexus-java.version}</version>
     </dependency>
 
     <dependency>
@@ -182,13 +184,13 @@
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
-      <version>1.9.5</version>
+      <version>2.28.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <version>4.13.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
@@ -253,7 +255,7 @@
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-invoker-plugin</artifactId>
-              <version>3.2.0</version>
+              <version>3.2.1</version>
               <executions>
                 <execution>
                   <id>integration-test</id>
@@ -331,28 +333,5 @@
         </dependency>
       </dependencies>
     </profile>
-    <profile>
-      <id>Jenkins</id>
-      <activation>
-        <property>
-          <name>env.JENKINS_URL</name>
-        </property>
-      </activation>
-      <build>
-        <pluginManagement>
-          <plugins>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-invoker-plugin</artifactId>
-              <configuration>
-                <pomExcludes>
-                  <pomExclude>multirelease-patterns/singleproject-toolchains/pom.xml</pomExclude>
-                </pomExcludes>
-              </configuration>
-            </plugin>
-          </plugins>
-        </pluginManagement>
-      </build>
-    </profile>
   </profiles>
 </project>
diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/invoker.properties b/src/it/MCOMPILER-275_separate-moduleinfo/invoker.properties
index e596763..028c62b 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/invoker.properties
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/invoker.properties
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-invoker.toolchain.jdk.version=9
+invoker.java.version = 1.8+
+invoker.toolchain.jdk.version=1.9
diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/pom.xml b/src/it/MCOMPILER-275_separate-moduleinfo/pom.xml
index 330663e..e6797a3 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/pom.xml
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/pom.xml
@@ -54,7 +54,7 @@
             <!-- compile everything to ensure module-info contains right entries -->

             <configuration>

               <jdkToolchain>

-                <version>9</version>

+                <version>1.9</version>

               </jdkToolchain>

               <release>9</release>

             </configuration>

diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/verify.groovy b/src/it/MCOMPILER-275_separate-moduleinfo/verify.groovy
index 60b858f..baf07f7 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/verify.groovy
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/verify.groovy
@@ -18,10 +18,11 @@
  */
 def log = new File( basedir, 'build.log').text
 
-//requires adding custom toolchains...
-//assert log.count( "[INFO] Toolchain in maven-compiler-plugin: JDK" ) == 1
+assert log.count( "[INFO] Toolchain in maven-compiler-plugin: JDK" ) == 1
 
 assert log.count( "[INFO] Changes detected - recompiling the module!" ) == 3
 
-assert new File( basedir, 'target/classes/com/foo/MyClass.class' ).bytes[7] == 50
+// major_version: 52 = java8 -> execution id "base-compile"
+assert new File( basedir, 'target/classes/com/foo/MyClass.class' ).bytes[7] == 52
+// major_version: 53 = java9 -> execution id "default-compile"
 assert new File( basedir, 'target/classes/module-info.class' ).bytes[7] == 53
diff --git a/src/it/MCOMPILER-349_dependencyChanged/pom.xml b/src/it/MCOMPILER-349_dependencyChanged/pom.xml
index d985a19..929d2dd 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/pom.xml
+++ b/src/it/MCOMPILER-349_dependencyChanged/pom.xml
@@ -65,6 +65,13 @@
               }
             </source>
           </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>org.codehaus.groovy</groupId>
+              <artifactId>groovy-all</artifactId>
+              <version>2.4.21</version>
+            </dependency>
+          </dependencies>
         </plugin>
       </plugins>
     </pluginManagement>
diff --git a/src/it/error-prone-compiler/invoker.properties b/src/it/error-prone-compiler/invoker.properties
deleted file mode 100644
index e511168..0000000
--- a/src/it/error-prone-compiler/invoker.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-invoker.java.version = 1.8+,!11,!12,!13
-invoker.goals = clean compile
-invoker.buildResult = failure
diff --git a/src/it/error-prone-compiler/pom.xml b/src/it/error-prone-compiler/pom.xml
deleted file mode 100644
index b0146ff..0000000
--- a/src/it/error-prone-compiler/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-
-<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/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.plugins.compiler.it</groupId>
-  <artifactId>error-prone-compiler</artifactId>
-  <version>1.0-SNAPSHOT</version>
-
-  <name>Test for default configuration</name>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.2</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@project.version@</version>
-        <configuration>
-          <compilerId>javac-with-errorprone</compilerId>
-          <forceJavacCompilerUse>true</forceJavacCompilerUse>
-        </configuration>
-        <dependencies>
-          <dependency>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-compiler-javac-errorprone</artifactId>
-            <version>@plexusCompilerVersion@</version>
-          </dependency>
-          <dependency>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-compiler-javac</artifactId>
-            <version>@plexusCompilerVersion@</version>
-          </dependency>
-
-        </dependencies>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/src/it/error-prone-compiler/src/main/java/MyClass.java b/src/it/error-prone-compiler/src/main/java/MyClass.java
deleted file mode 100644
index 0adb65f..0000000
--- a/src/it/error-prone-compiler/src/main/java/MyClass.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-    public static void main(String[] args) {
-        // error: dead exception
-        new Exception();
-    }
-
-}
diff --git a/src/it/error-prone-compiler/src/test/java/MyTest.java b/src/it/error-prone-compiler/src/test/java/MyTest.java
deleted file mode 100644
index 24df915..0000000
--- a/src/it/error-prone-compiler/src/test/java/MyTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import junit.framework.TestCase;
-
-import java.util.*;
-
-public class MyTest
-    extends TestCase
-{
-
-    public boolean bug2() {
-        //BUG: Suggestion includes "return false"
-        return new ArrayList<String>().remove(new Date());
-    }
-
-}
diff --git a/src/it/error-prone-compiler/verify.groovy b/src/it/error-prone-compiler/verify.groovy
deleted file mode 100644
index 5fca29d..0000000
--- a/src/it/error-prone-compiler/verify.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-def logFile = new File( basedir, 'build.log' )
-assert logFile.exists()
-content = logFile.text
-
-assert content.contains( 'Compilation failure' )
-assert content.contains( '[DeadException] Exception created but not thrown' )
diff --git a/src/it/mcompiler-182/invoker.properties b/src/it/mcompiler-182/invoker.properties
index 24e428d..8511bf0 100644
--- a/src/it/mcompiler-182/invoker.properties
+++ b/src/it/mcompiler-182/invoker.properties
@@ -16,6 +16,6 @@
 # under the License.
 
 invoker.goals = clean compile
-invoker.goals.2 = org.codehaus.gmaven:gmaven-plugin:execute
+invoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute
 invoker.goals.3 = compile
 invoker.buildResult.3 = failure
diff --git a/src/it/mcompiler-182/pom.xml b/src/it/mcompiler-182/pom.xml
index d8026ad..32e8491 100644
--- a/src/it/mcompiler-182/pom.xml
+++ b/src/it/mcompiler-182/pom.xml
@@ -47,8 +47,8 @@
       <plugin>
         <!-- Called as second invoker goal to simulate file adjustment -->
         <groupId>org.codehaus.gmaven</groupId>
-        <artifactId>gmaven-plugin</artifactId>
-        <version>1.4</version>
+        <artifactId>groovy-maven-plugin</artifactId>
+        <version>2.0</version>
         <configuration>
           <source>
             def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
@@ -62,6 +62,13 @@
             beanAFile.delete()
           </source>
         </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>2.4.21</version>
+          </dependency>
+        </dependencies>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/mcompiler-21_class-remove/invoker.properties b/src/it/mcompiler-21_class-remove/invoker.properties
index 24e428d..8511bf0 100644
--- a/src/it/mcompiler-21_class-remove/invoker.properties
+++ b/src/it/mcompiler-21_class-remove/invoker.properties
@@ -16,6 +16,6 @@
 # under the License.
 
 invoker.goals = clean compile
-invoker.goals.2 = org.codehaus.gmaven:gmaven-plugin:execute
+invoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute
 invoker.goals.3 = compile
 invoker.buildResult.3 = failure
diff --git a/src/it/mcompiler-21_class-remove/pom.xml b/src/it/mcompiler-21_class-remove/pom.xml
index 83bf6d1..9c1ac32 100644
--- a/src/it/mcompiler-21_class-remove/pom.xml
+++ b/src/it/mcompiler-21_class-remove/pom.xml
@@ -47,8 +47,8 @@
       <plugin>
         <!-- Called as second invoker goal to simulate file adjustment -->
         <groupId>org.codehaus.gmaven</groupId>
-        <artifactId>gmaven-plugin</artifactId>
-        <version>1.4</version>
+        <artifactId>groovy-maven-plugin</artifactId>
+        <version>2.0</version>
         <configuration>
           <source>
             def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
@@ -56,6 +56,13 @@
             beanAFile.delete()
           </source>
         </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>2.4.21</version>
+          </dependency>
+        </dependencies>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/mcompiler-21_methodname-change/invoker.properties b/src/it/mcompiler-21_methodname-change/invoker.properties
index 24e428d..8511bf0 100644
--- a/src/it/mcompiler-21_methodname-change/invoker.properties
+++ b/src/it/mcompiler-21_methodname-change/invoker.properties
@@ -16,6 +16,6 @@
 # under the License.
 
 invoker.goals = clean compile
-invoker.goals.2 = org.codehaus.gmaven:gmaven-plugin:execute
+invoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute
 invoker.goals.3 = compile
 invoker.buildResult.3 = failure
diff --git a/src/it/mcompiler-21_methodname-change/pom.xml b/src/it/mcompiler-21_methodname-change/pom.xml
index b36b41e..19c401a 100644
--- a/src/it/mcompiler-21_methodname-change/pom.xml
+++ b/src/it/mcompiler-21_methodname-change/pom.xml
@@ -47,8 +47,8 @@
       <plugin>
         <!-- Called as second invoker goal to simulate file adjustment -->
         <groupId>org.codehaus.gmaven</groupId>
-        <artifactId>gmaven-plugin</artifactId>
-        <version>1.4</version>
+        <artifactId>groovy-maven-plugin</artifactId>
+        <version>2.0</version>
         <configuration>
           <source>
             def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
@@ -63,6 +63,13 @@
             }
           </source>
         </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>2.4.21</version>
+          </dependency>
+        </dependencies>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/multirelease-patterns/singleproject-runtime/pom.xml b/src/it/multirelease-patterns/singleproject-runtime/pom.xml
index c799ff9..668f124 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/pom.xml
+++ b/src/it/multirelease-patterns/singleproject-runtime/pom.xml
@@ -104,10 +104,7 @@
                     <compileSourceRoots>
                       <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
                     </compileSourceRoots>
-                    <outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
-                    <compilerArgs>
-                      <arg>--patch-module</arg><arg>example.mrjar=${project.build.outputDirectory}</arg>
-                    </compilerArgs>
+                    <multiReleaseOutput>true</multiReleaseOutput>
                   </configuration>
                 </execution>
               </executions>
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/invoker.properties b/src/it/multirelease-patterns/singleproject-toolchains/invoker.properties
index e0899b0..3e89fdd 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/invoker.properties
+++ b/src/it/multirelease-patterns/singleproject-toolchains/invoker.properties
@@ -15,4 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 invoker.goals = verify -Pmulti-jar
-invoker.toolchain.jdk.version=9
+invoker.toolchain.jdk.version=1.9
+# Due to toolchain support
+invoker.maven.version = 3.3.1+
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/pom.xml b/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
index 748e50b..efcadb4 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
+++ b/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
@@ -81,7 +81,7 @@
             <configuration>
               <release>9</release>
               <jdkToolchain>
-                <version>9</version>
+                <version>1.9</version>
               </jdkToolchain>
               <compileSourceRoots>
                 <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/verify.groovy b/src/it/multirelease-patterns/singleproject-toolchains/verify.groovy
index 6e97274..e3c1013 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/verify.groovy
+++ b/src/it/multirelease-patterns/singleproject-toolchains/verify.groovy
@@ -54,7 +54,7 @@
   META-INF/maven/multirelease/multirelease/pom.xml
   META-INF/maven/multirelease/multirelease/pom.properties
 */
-assert mrjar.entries().size() == 17
+assert mrjar.size() == 17
 
 int getMajor(InputStream is)
 {
@@ -70,4 +70,3 @@
   is.close();
   return majorVersion;
 }
-
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 703b9aa..7d67f4a 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -98,9 +98,9 @@
 {
     protected static final String PS = System.getProperty( "path.separator" );
 
-    static final String DEFAULT_SOURCE = "1.6";
+    static final String DEFAULT_SOURCE = "1.7";
     
-    static final String DEFAULT_TARGET = "1.6";
+    static final String DEFAULT_TARGET = "1.7";
     
     // Used to compare with older targets
     static final String MODULE_INFO_TARGET = "1.9";
@@ -167,7 +167,8 @@
     /**
      * <p>The -source argument for the Java compiler.</p>
      * 
-     * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6
+     * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6.
+     * Since 3.9.0 the default value has changed from 1.6 to 1.7
      */
     @Parameter( property = "maven.compiler.source", defaultValue = DEFAULT_SOURCE )
     protected String source;
@@ -175,7 +176,8 @@
     /**
      * <p>The -target argument for the Java compiler.</p>
      * 
-     * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6
+     * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6.
+     * Since 3.9.0 the default value has changed from 1.6 to 1.7
      */
     @Parameter( property = "maven.compiler.target", defaultValue = DEFAULT_TARGET )
     protected String target;
@@ -481,7 +483,19 @@
     private List<String> fileExtensions;
 
     /**
-     * to enable/disable incrementation compilation feature
+     * <p>to enable/disable incremental compilation feature.</p>
+     * <p>This leads to two different modes depending on the underlying compiler. The default javac compiler does the
+     * following:</p>
+     * <ul>
+     * <li>true <strong>(default)</strong> in this mode the compiler plugin determines whether any JAR files the
+     * current module depends on have changed in the current build run; or any source file was added, removed or
+     * changed since the last compilation. If this is the case, the compiler plugin recompiles all sources.</li>
+     * <li>false <strong>(not recommended)</strong> this only compiles source files which are newer than their
+     * corresponding class files, namely which have changed since the last compilation. This does not
+     * recompile other classes which use the changed class, potentially leaving them with references to methods that no
+     * longer exist, leading to errors at runtime.</li>
+     * </ul>
+     *
      * @since 3.1
      */
     @Parameter( defaultValue = "true", property = "maven.compiler.useIncrementalCompilation" )
@@ -1344,7 +1358,7 @@
                 getLog().debug( "Stale source detected: " + f.getAbsolutePath() );
             }
         }
-        return staleSources != null && !staleSources.isEmpty();
+        return !staleSources.isEmpty();
     }
 
 
@@ -1361,7 +1375,7 @@
             Object mavenExecutionRequest = getRequestMethod.invoke( this.session );
             Method getThreadCountMethod = mavenExecutionRequest.getClass().getMethod( "getThreadCount" );
             String threadCount = (String) getThreadCountMethod.invoke( mavenExecutionRequest );
-            return Integer.valueOf( threadCount );
+            return Integer.parseInt( threadCount );
         }
         catch ( Exception e )
         {
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java b/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
index b231c8e..4d62454 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
@@ -34,45 +34,50 @@
 {
     private static final String LS = System.getProperty( "line.separator" );
 
+    /**
+     * Wrap error messages from the compiler
+     *
+     * @param messages the messages, not null
+     * @since 2.0
+     */
     public CompilationFailureException( List<CompilerMessage> messages )
     {
         super( null, shortMessage( messages ), longMessage( messages ) );
     }
 
+    /**
+     * Long message will have all messages, one per line
+     *
+     * @param messages the messages, not null
+     * @return the long error message
+     * @since 2.0
+     */
     public static String longMessage( List<CompilerMessage> messages )
     {
         StringBuilder sb = new StringBuilder();
 
-        if ( messages != null )
+        for ( CompilerMessage compilerError : messages )
         {
-            for ( CompilerMessage compilerError : messages )
-            {
-                sb.append( compilerError ).append( LS );
-            }
+            sb.append( compilerError ).append( LS );
         }
+
         return sb.toString();
     }
 
     /**
      * Short message will have the error message if there's only one, useful for errors forking the compiler
      *
-     * @param messages the messages
+     * @param messages the messages, not null
      * @return the short error message
      * @since 2.0.2
      */
     public static String shortMessage( List<CompilerMessage> messages )
     {
-        StringBuilder sb = new StringBuilder();
-
-        sb.append( "Compilation failure" );
+        StringBuilder sb = new StringBuilder( "Compilation failure" );
 
         if ( messages.size() == 1 )
         {
-            sb.append( LS );
-
-            CompilerMessage compilerError = messages.get( 0 );
-
-            sb.append( compilerError ).append( LS );
+            sb.append( LS ).append( messages.get( 0 ) ).append( LS );
         }
 
         return sb.toString();
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index 78d3908..49a76c1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@@ -33,7 +33,6 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
@@ -48,9 +47,9 @@
 import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
 import org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor;
 import org.codehaus.plexus.languages.java.jpms.LocationManager;
+import org.codehaus.plexus.languages.java.jpms.ModuleNameSource;
 import org.codehaus.plexus.languages.java.jpms.ResolvePathsRequest;
 import org.codehaus.plexus.languages.java.jpms.ResolvePathsResult;
-import org.codehaus.plexus.languages.java.jpms.ResolvePathsResult.ModuleNameSource;
 
 /**
  * Compiles application sources
@@ -124,8 +123,7 @@
     @Parameter
     private boolean multiReleaseOutput;
 
-    @Component
-    private LocationManager locationManager;
+    final LocationManager locationManager = new LocationManager();
 
     private List<String> classpathElements;
 
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index 5b0518b..f6c1d5b 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -34,7 +34,6 @@
 import java.util.Set;
 
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
@@ -160,8 +159,7 @@
     @Parameter( defaultValue = "${project.testClasspathElements}", readonly = true )
     private List<String> testPath;
 
-    @Component
-    private LocationManager locationManager;
+    final LocationManager locationManager = new LocationManager();
 
     private Map<String, JavaModuleDescriptor> pathElements;
     
@@ -250,7 +248,7 @@
                 
                 for ( Entry<String, Exception> pathException : result.getPathExceptions().entrySet() )
                 {
-                    Throwable cause = pathException.getValue().getCause();
+                    Throwable cause = pathException.getValue();
                     while ( cause.getCause() != null )
                     {
                         cause = cause.getCause();
diff --git a/src/site/apt/examples/module-info.apt.vm b/src/site/apt/examples/module-info.apt.vm
index 97323a2..48669a4 100644
--- a/src/site/apt/examples/module-info.apt.vm
+++ b/src/site/apt/examples/module-info.apt.vm
@@ -28,16 +28,34 @@
 

 Older projects with module-info

 

-  For projects that want to be compatible with older versions of Java (i.e 1.8 or below), but also want to provide a

-  <<<module-info.java>>> for Java 9 projects must be aware that they need to call <<<javac>>> twice: the 

-  <<<module-info.java>>> must be compiled with <<<release=9>>>, while the rest of the sources must be compiled with a

-  lower version of <<<source>>>/<<<target>>>.

+  Projects that want to be compatible with older versions of Java (i.e 1.8 or below bytecode and API), but also want to provide a

+  <<<module-info.java>>> for use on Java 9+ runtime, must be aware that they need to call <<<javac>>> twice:

+  

+  [[1]] the <<<module-info.java>>> must be compiled with <<<release=9>>>,

 

-  The preferred way to do this is by having 2 execution blocks are described below. JDK 9 only supports compilations for 

-  Java 6 and above, so projects wanting to be compatible with Java 5 or below need to use two different JDKs. With 

-  {{{/guides/mini/guide-using-toolchains.html}toolchains}} it is quite easy to achieve this. Be aware that you will

-  need at least Maven 3.3.1 to specify a custom jdkToolchain in your plugin configuration. You could add a jdkToolchain

-  to do base-compile execution-block as well referring to JDK 5. 

+  [[2]] while the rest of the sources must be compiled with the lower expected compatibility version of <<<source>>>/<<<target>>>.

+

+  []

+

+  The preferred way to do this is by having 2 execution blocks, as described below:

+

+  [[1]] default <<<default-compile>>> execution with <<<release=9>>>,

+

+  [[2]] additional custom <<<base-compile>>> execution with expected target compatibility.

+

+  []

+

+  Notice that, in addition, JDK 9 only supports compilations for Java 6 and above, so projects wanting to be compatible with Java 5 or below need

+  to use two different JDKs for the 2 executions. With {{{/guides/mini/guide-using-toolchains.html}toolchains}} configuration, it is

+  quite easy to achieve this, even if a little bit more complex.

+

+* Java 6 to 8 Compatibility

+

+  In case you want the project to be Java 6, 7 or 8 compatible, you can simply use JDK 9 for both execution blocks.

+

+  The easiest way is to use Java 9 as the runtime for Maven, by setting <<<JAVA_HOME=/path/to/jdk-9>>> before running <<<mvn>>>.

+  But if you want to use an older Java runtime for Maven, you can use the maven-toolchain-plugin to specify the shared JDK (supported since Maven 2.0.9)

+  or a custom jdkToolchain (supported since Maven 3.3.1) and refer to the JDK 9 installation on your system.  

 

 +-------

 <project>

@@ -53,12 +71,8 @@
           <execution>

             <id>default-compile</id>

             <configuration>

-              <!-- compile everything to ensure module-info contains right entries -->

-              <!-- required when JAVA_HOME is JDK 8 or below -->

-              <jdkToolchain>

-                <version>9</version>

-              </jdkToolchain>

               <release>9</release>

+              <!-- no excludes: compile everything to ensure module-info contains right entries -->

             </configuration>

           </execution>

           <execution>

@@ -66,8 +80,8 @@
             <goals>

               <goal>compile</goal>

             </goals>

-            <!-- recompile everything for target VM except the module-info.java -->

             <configuration>

+              <!-- recompile everything for target VM except the module-info.java -->

               <excludes>

                 <exclude>module-info.java</exclude>

               </excludes>

@@ -76,12 +90,11 @@
         </executions>

         <!-- defaults for compile and testCompile -->

         <configuration>

-          <!-- jdkToolchain required when JAVA_HOME is JDK 9 or above -->

+          <release>6</release><!-- or 7 or 8 depending on compatibility expectations -->

+          <!-- Only required when Maven runtime JAVA_HOME isn't at least Java 9 and when haven't configured the maven-toolchains-plugin -->

           <jdkToolchain>

-            <version>[1.5,9)</version>

+            <version>9</version>

           </jdkToolchain>

-          <source>1.5</source>

-          <target>1.5</target>

         </configuration>

       </plugin>

     </plugins>

@@ -91,10 +104,13 @@
 </project>

 +-------

 

-  In case you want the project to be Java 6 compatible, the easiest to do this is to use Java 9 for both execution

-  blocks. You can use the maven-toolchain-plugin to specify the shared JDK (supported since Maven 2.0.9) or a custom 

-  jdkToolchain (supported since Maven 3.3.1) and refer to the JDK 9 installation on your system. Or simply use Java 9

-  as the runtime for Maven by setting <<<JAVA_HOME=/path/to/jdk-9>>>. 

+* Java 5 or below Compatibility

+

+  Given Maven 3 requires newer Java release at runtime, you'll absolutely need to use Toolchains to use a JDK different from

+  Maven runtime.

+

+  Be aware that you will need at least Maven 3.3.1 to specify a custom jdkToolchain in your plugin configuration.

+  You could add a jdkToolchain to do base-compile execution-block as well referring to JDK 5. 

 

 +-------

 <project>

@@ -110,8 +126,12 @@
           <execution>

             <id>default-compile</id>

             <configuration>

-              <!-- compile everything to ensure module-info contains right entries -->

               <release>9</release>

+              <!-- no excludes: compile everything to ensure module-info contains right entries -->

+              <!-- toolchain required when JAVA_HOME is JDK 8 or below -->

+              <jdkToolchain>

+                <version>9</version>

+              </jdkToolchain>

             </configuration>

           </execution>

           <execution>

@@ -119,8 +139,8 @@
             <goals>

               <goal>compile</goal>

             </goals>

-            <!-- recompile everything for target VM except the module-info.java -->

             <configuration>

+              <!-- recompile everything for target VM except the module-info.java -->

               <excludes>

                 <exclude>module-info.java</exclude>

               </excludes>

@@ -129,11 +149,12 @@
         </executions>

         <!-- defaults for compile and testCompile -->

         <configuration>

-          <!-- Only required when JAVA_HOME isn't at least Java 9 and when haven't configured the maven-toolchains-plugin -->

+          <source>1.5</source>

+          <target>1.5</target>

+          <!-- jdkToolchain required when JAVA_HOME is JDK 9 or above -->

           <jdkToolchain>

-            <version>9</version>

+            <version>[1.5,9)</version>

           </jdkToolchain>

-          <release>6</release>

         </configuration>

       </plugin>

     </plugins>

diff --git a/src/site/apt/examples/set-compiler-release.apt.vm b/src/site/apt/examples/set-compiler-release.apt.vm
new file mode 100644
index 0000000..671b9d2
--- /dev/null
+++ b/src/site/apt/examples/set-compiler-release.apt.vm
@@ -0,0 +1,82 @@
+ ------
+ Setting the --release of the Java Compiler
+ ------
+ Mahmoud Anouti
+ ------
+ 2019-12-20
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Setting the <<<--release>>> of the Java Compiler
+
+  Starting JDK 9, the <<<javac>>> executable can accept the <<<--release>>>
+  option to specify against which Java SE release you want to build the project.
+  For example, you have JDK 11 installed and used by Maven, but you want to
+  build the project against Java 8.
+  The <<<--release>>> option ensures that the code is compiled following the
+  rules of the programming language of the specified release, and that generated
+  classes target the release as well as the public API of that release. This
+  means that, unlike the
+  {{{../examples/set-compiler-source-and-target.html}<<<-source>>> and <<<-target>>> options}},
+  the compiler will detect and generate an error when using APIs that don't exist
+  in previous releases of Java SE.
+
+  Since version 3.6 of the Compiler Plugin, this option can be provided either
+  via a property:
+
++-----
+<project>
+  [...]
+  <properties>
+    <maven.compiler.release>8</maven.compiler.release>
+  </properties>
+  [...]
+</project>
++-----
+
+  or by configuring the plugin directly:
+
++-----
+<project>
+  [...]
+  <build>
+    [...]
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <release>8</release>
+        </configuration>
+      </plugin>
+    </plugins>
+    [...]
+  </build>
+  [...]
+</project>
++-----
+
+  <<Note:>> The value in the <<<release>>> parameter follows the new version naming scheme adopted
+  since Java 9. As such, the release number does not start with 1.x anymore. Also note that the
+  supported <<<release>>> targets include the release of the currently used JDK plus a limited number
+  of previous releases.
diff --git a/src/site/apt/examples/set-compiler-source-and-target.apt.vm b/src/site/apt/examples/set-compiler-source-and-target.apt.vm
index 8a051b6..c02b52d 100644
--- a/src/site/apt/examples/set-compiler-source-and-target.apt.vm
+++ b/src/site/apt/examples/set-compiler-source-and-target.apt.vm
@@ -75,9 +75,10 @@
   <<Note:>> Merely setting the <<<target>>> option does not guarantee that your code actually runs on a JRE with the
   specified version. The pitfall is unintended usage of APIs that only exist in later JREs which would make your code
   fail at runtime with a linkage error. To avoid this issue, you can either configure the compiler's boot classpath
-  to match the target JRE or use the
+  to match the target JRE, or use the
   {{{http://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/}Animal Sniffer Maven Plugin}}
-  to verify your code doesn't use unintended APIs. In the same way, setting the <<<source>>> option does not guarantee 
-  that your code actually compiles on a JDK with the specified version. To compile your code with a specific JDK 
-  version, different than the one used to launch Maven, refer to the
-  {{{../examples/compile-using-different-jdk.html}Compile Using A Different JDK}} example.
+  to verify your code doesn't use unintended APIs, or better yet use the
+  {{{../examples/set-compiler-release.html}<<<release>>> option supported since JDK 9}}.
+  In the same way, setting the <<<source>>> option does not guarantee that your code actually compiles on a JDK with
+  the specified version. To compile your code with a specific JDK version, different than the one used to launch Maven,
+  refer to the {{{../examples/compile-using-different-jdk.html}Compile Using A Different JDK}} example.
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 1fcf71c..7162b2b 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -32,8 +32,8 @@
   default compiler is javax.tools.JavaCompiler (if you are using java 1.6) and is used to compile Java sources.
   If you want to force the plugin using  <<<javac>>>, you must configure the plugin option {{{./compile-mojo.html#forceJavacCompilerUse}<<<forceJavacCompilerUse>>>}}.
 
-  Also note that at present the default <<<source>>> setting is <<<1.6>>> and the default <<<target>>>
-  setting is <<<1.6>>>, independently of the JDK you run Maven with.
+  Also note that at present the default <<<source>>> setting is <<<1.7>>> and the default <<<target>>>
+  setting is <<<1.7>>>, independently of the JDK you run Maven with.
   You are highly encouraged to change these defaults by setting <<<source>>> and <<<target>>>
   as described in
   {{{./examples/set-compiler-source-and-target.html}Setting the -source and -target of the Java Compiler}}.
@@ -42,7 +42,7 @@
   on AspectJ, .NET, and C#.
 
   <<NOTE:>> <To know more about the JDK javac, please see:
-  {{http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html}}.>
+  {{https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html}}.>
 
 * Goals Overview
 
@@ -83,6 +83,8 @@
 
   * {{{./examples/set-compiler-source-and-target.html}Compile Using -source and -target javac Options}}
 
+  * {{{./examples/set-compiler-release.html}Compile Using the --release javac Option (supported since JDK 9)}}
+
   * {{{./examples/compile-with-memory-enhancements.html}Compile Using Memory Allocation Enhancement}}
 
   * {{{./examples/pass-compiler-arguments.html}Pass Compiler Arguments}}
diff --git a/src/site/apt/multirelease.apt b/src/site/apt/multirelease.apt
index fff7686..42aa53d 100644
--- a/src/site/apt/multirelease.apt
+++ b/src/site/apt/multirelease.apt
@@ -28,9 +28,13 @@
 
 Multi Release
  
-  With {{{http://openjdk.java.net/jeps/238}JEP-238}} the support of multirelease jars was introduced. This means that you can Java version dependent classes inside one jar. Based on the runtime it will pick up the best matching version of a class.
+  With {{{http://openjdk.java.net/jeps/238}JEP-238}} the support of multirelease jars was introduced.
+  This means that you can have Java version dependent classes inside one jar.
+  Based on the runtime it will pick up the best matching version of a class.
 
-* The "forward compatibility" problem
+* JEP-238 Introduction
+
+** The "forward compatibility" problem
 
   The problem this JEP is trying to solve is to make it possible to use new JDK features even though the codebase must stay compatible with earlier versions.
 
@@ -38,7 +42,7 @@
     
   Up until Java 8 there were 2 solutions:
   
-  * Compile with the targeted JDK (i.e. Java 6) and use reflection. You can ensure that the code is Java 6 compatible, but the reflection-part is hard to verify.
+  [[1]] Compile with the targeted JDK (i.e. Java 6) and use reflection. You can ensure that the code is Java 6 compatible, but the reflection-part is hard to verify.
   
 ---
   if ( isAtLeastJava7() ) {
@@ -53,7 +57,7 @@
   }
 ---
   
-  * Compile with the required JDK (i.e. Java 7), but use source/target of the lowest version (i.e. 1.6). The danger here is that you cannot ensure that all code is Java 6 compatible. Depending on the code structure {{{https://www.mojohaus.org/animal-sniffer/}Animal Sniffer}} might help.
+  [[2]] Compile with the required JDK (i.e. Java 7), but use source/target of the lowest version (i.e. 1.6). The danger here is that you cannot ensure that all code is Java 6 compatible. Depending on the code structure {{{https://www.mojohaus.org/animal-sniffer/}Animal Sniffer}} might help.
   
 ---
   if ( isAtLeastJava7() ) {
@@ -67,7 +71,7 @@
  
   []
 
-* The "forward compatibility" solution
+** The "forward compatibility" solution
 
 ---
 A.class
@@ -87,12 +91,14 @@
 * Challenges
 
   The theory behind multi release jars is quite simple, but in practice it can become quite complex. You must ensure that all classes stay in sync; if you add a method to one class, don't forget to add it to the other classes as well.
-  There are some options which should reduces problems at this level: Let all multirelease classes implement an interface and in the basecode instantiate the class but only call the interface methods. The best is to test the *jar* with all targeted Java versions.
+  There are some options which should reduce problems at this level:
+  Let all multirelease classes implement an interface and in the basecode instantiate the class but only call the interface methods.
+  The best is to test the *jar* with all targeted Java versions.
   You should think twice before turning your jar into a multi release jar, because such jars can be hard to read, maintain and test. In general applications don't need this, unless it is a widely distributed application and you don't control the targeted Java runtime. Libraries should make a decision based on: do I need this new Java feature? Can I make this Java version the new requirement? Would it be acceptable to solve this with an else/if-statement as mentioned in the first paragraph? 
 
   There are a couple of important facts one should know when creating Multi Release jars.
   
-  * The Java compiler must be called for every different version. The solutions solve this either by having multiple Maven Projects/Modules or by adding extra execution-blocks to the pom. 
+  * The Java compiler must be called for every different version. The solutions solve this either by having multiple Maven Projects/Modules or by adding extra compiler execution-blocks to the POM (like {{{./examples/module-info.html}older projects with module-info}}). 
   
   * The <<<Multi-Release: true>>> attribute is only recognized when the classes are in a jar. In other words, you cannot test the classes put in <<<target/classes/META-INF/versions/$\{release}/>>>.
   
@@ -100,7 +106,7 @@
   
   []       
 
-{{{https://github.com/hboutemy/maven-jep238}Maven Multimodule}}
+Pattern 1: {{{https://github.com/hboutemy/maven-jep238}Maven Multimodule}}
 
   This is the first pattern provided by the Maven team themselves. They had the following  requirements:
   
@@ -112,17 +118,19 @@
   
   []
   
-  The only solution to cover the first two bullets was by split the code into a Maven multimodule project. Now every Maven module is just a standard Maven project with close to no specific adjustments in the pom.
+  The only solution to cover the first two bullets was to split the code into a Maven multimodule project.
+  Now every Maven module is just a standard Maven project with close to no specific adjustments in the pom.
   There are several ways you can run this project:
   
   * Use the highest required version of the JDK to build the project. You can use <<<release>>> to ensure the code only uses matching code and syntax. Since the version-code is isolated you can run surefire with a higher Java runtime.
   
   * Use toolchains if you really want to compile and test with the matching Java version. 
   
+  []
    
   The downside it that a hierarchical structure is required even though the result is just 1 artifact.
   
-{{{http://word-bits.flurg.com/multrelease-jars/}Multi Project}} 
+Pattern 2: {{{http://word-bits.flurg.com/multrelease-jars/}Multi Project}} 
 
   This solution is a response to the previous Maven multimodule setup. The requirements are almost the same
 
@@ -132,12 +140,13 @@
   
   []
 
-  The first requirements implies that the project now are separate Maven projects. One Maven project contains the base-code and in the end this will also be the multirelease jar. 
+  The first requirements implies that the projects now are separate Maven projects.
+  One Maven project contains the base-code and in the end this will also be the multirelease jar.
   When building such project for the first time, you'll need to call Maven at least 3 times: first the base needs to be compiled, next all version specific projects must be built and finally the main project needs to be built again, now including the version specific classes extracted from their jars.
   This setup is compact, but has cyclic dependencies. This requires some tricks and makes releasing a bit more complicated.
   Another downside is that you must install SNAPSHOTs to your local repository and when doing a release it requires 2 releases of the base project, one to prepare for the multirelease-nine and one with the released multirelease-nine. 
    
-Single project
+Pattern 3: Single Project
 
   By now there are 3 solutions, each inspired by their previous version.
 
@@ -151,7 +160,9 @@
 
 * {{{http://in.relation.to/2017/02/13/building-multi-release-jars-with-maven/}Single Project}}
 
-  In this case everything stays inside one Maven project. Every specific Java version get its own source folder and output folder, and just before packaging they are combined. What's not covered is how to test every class.
+  In this case everything stays inside one Maven project.
+  Every specific Java version gets its own source folder and output folder, and just before packaging they are combined.
+  What's not covered is how to test every class.
 
 * {{{http://www.russgold.net/sw/2018/04/easier-than-it-looks/}Multi-Release Parent}}
 
@@ -163,13 +174,14 @@
   This approach reduces the previous solution by only specifying execution blocks for sources for a specific Java version. It doesn't use toolchains, but the JDK used to run Maven. This means that only the sources up to the specific Java version are compiled and tested. 
   This solution relies heavily on a CI-server where every targeted Java version is available. If the CI-server succeeds, then all classes are tested with their matching Java version.
 
-{{{https://github.com/metlos/multi-release-jar-maven-plugin}Maven extension + plugin}}
+Pattern 4: {{{https://github.com/metlos/multi-release-jar-maven-plugin}Maven extension + plugin}}
 
-  This approach introduces a new packaging type and an extra plugins takes care of the multiple executions of the maven-compiler-plugin, but these are now
+  This approach introduces a new packaging type and an extra plugin takes care of the multiple executions of the maven-compiler-plugin, but these are now
   handled by the <<<perReleaseConfiguration>>> of the <<<multi-release-jar-maven-plugin>>>. What's not covered is how to test every class.
-  
 
-  For every pattern are integration tests created, based on the same set of sourcefiles. See {{https://github.com/apache/maven-compiler-plugin/tree/master/src/it/multirelease-patterns}}
+Patterns Summary
+
+  For every pattern there are integration tests created, based on the same set of sourcefiles. See {{https://github.com/apache/maven-compiler-plugin/tree/master/src/it/multirelease-patterns}}
 
 *-------------------------------*-----------------------*-------------------------*---------------------------*------------------------------*--------------------------------*
 ||                              || Maven Multimodule    || Multi Project          || Single project (runtime) || Single project (toolchains) || Maven extension+plugin        ||
@@ -190,12 +202,19 @@
 *-------------------------------+-----------------------+-------------------------+---------------------------+------------------------------*--------------------------------+
 
   (a) Project can only be executed with highest required JDK, hence you can't test the code for all JDKs
+
   (b) Additional POM adjustments: # of executions added to the default lifecycle. This reflects the complexity of the POM.
+
   (c) Maven multimodule uses maven-assembly-plugin to assemble to multirelease jar
+
   (d) Multi project uses the maven-dependency-plugin to unpack java specific dependency to its matching outputDirectory
+
   (e) There's a profile for every Java version required which contains an extra execution-block for that Java version.
+
   (f) 
+
   (g) Maven extension+plugin hides the multiple executions in the <<<perReleaseConfiguration>>> configuration
+
   (h) Requires a --patch-module on a dependency 
+
   (i) IDE Support: All classes are recognized and can be tested within the IDE.
-  
\ No newline at end of file
diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml
index 5079d9c..7008fb4 100644
--- a/src/site/fml/faq.fml
+++ b/src/site/fml/faq.fml
@@ -30,11 +30,11 @@
         <p>Modello generate the sources in the generate-sources phase and automatically adds the
           source directory for compilation in Maven. So you don't have to copy the generated sources.
         </p>
-        <p>You have to declare the <a href="http://modello.codehaus.org/modello-maven-plugin/">Modello Maven Plugin</a>
+        <p>You have to declare the <a href="https://codehaus-plexus.github.io/modello/modello-maven-plugin/">Modello Maven Plugin</a>
           in the build of your project for source generation (in that way the sources are generated each time).
         </p>
         <p>For more information about Modello, please visit the
-          <a href="http://modello.codehaus.org/">Modello website</a>
+          <a href="https://codehaus-plexus.github.io/modello/">Modello website</a>
           .
         </p>
       </answer>
diff --git a/src/site/site.xml b/src/site/site.xml
index f38ad60..c93a729 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -35,6 +35,7 @@
     <menu name="Examples">
       <item name="Compile Using A Different JDK" href="examples/compile-using-different-jdk.html"/>
       <item name="Compile Using -source and -target javac Options" href="examples/set-compiler-source-and-target.html"/>
+      <item name="Compile Using the --release javac Option (JDK 9+)" href="examples/set-compiler-release.html"/>
       <item name="Compile Using Memory Allocation Enhancements" href="examples/compile-with-memory-enhancements.html"/>
       <item name="Pass Compiler Arguments" href="examples/pass-compiler-arguments.html"/>
       <item name="Non-javac compilerIds" href="non-javac-compilers.html"/>
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index 348cfb0..b1282d5 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import static org.mockito.Matchers.startsWith;
+import static org.mockito.ArgumentMatchers.startsWith;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;