Enforce minimum Maven version
The maven-enforcer-plugin will provide a good error message when the
user has an old version of Maven. Otherwise, weird and unpredictable
errors may occur.
<!-- The versions of Apache Maven plugins used. Please keep alphabetical.-->
<maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.0.1</maven-dependency-plugin.version>
+ <maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<maven-license-plugin.version>1.13</maven-license-plugin.version>
<maven-shade-plugin.version>3.0.0</maven-shade-plugin.version>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>${maven-enforcer-plugin.version}</version>
+ </plugin>
+
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>${maven-enforcer-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>enforce-maven</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>3.3.9</version>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
