Commit 728aac65 by Nigel Jones Committed by David Radley

ATLAS-2245 Add maven-enforce plugin to validate maven, java versions

parent a40f3c2c
...@@ -176,30 +176,6 @@ ...@@ -176,30 +176,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-java-8</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>1.8.0</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.1.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version> <version>${surefire.version}</version>
<configuration> <configuration>
......
...@@ -1616,6 +1616,13 @@ ...@@ -1616,6 +1616,13 @@
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!-- support for enforcement of maven & Java versions -->
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin> <plugin>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId> <artifactId>antlr4-maven-plugin</artifactId>
...@@ -1767,6 +1774,37 @@ ...@@ -1767,6 +1774,37 @@
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<!-- enforcement of maven version 3.5.0 or above & Java 8 (151) or above -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.5.0,)</version>
<message>** MAVEN VERSION ERROR ** Maven 3.5.0 or above is required. See https://maven.apache.org/install.html </message>
</requireMavenVersion>
<requireJavaVersion>
<level>ERROR</level>
<version>[1.8.0-151,)</version>
<message>** JAVA VERSION ERROR ** Java 8 (Update 151) or above is required.</message>
</requireJavaVersion>
<requireJavaVersion>
<level>WARN</level>
<version>(,1.9]</version>
<message>** JAVA VERSION WARNING ** Java 9 and above has not been tested with Atlas.</message>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment