HBASE-12381 use the Maven Enforcer Plugin to check maven and java versions.

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Sean Busbey 2014-10-30 11:28:35 -05:00 committed by stack
parent d8874fbc21
commit 158e009f4c
1 changed files with 40 additions and 0 deletions

40
pom.xml
View File

@ -725,6 +725,43 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<!-- version set by parent -->
<configuration>
<rules>
<!-- The earliest maven version we verify builds for via ASF Jenkins -->
<requireMavenVersion>
<version>[${maven.min.version},)</version>
<message>Maven is out of date.
HBase requires at least version ${maven.min.version} of Maven to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.
See the reference guide on building for more information: http://hbase.apache.org/book.html#build
</message>
</requireMavenVersion>
<!-- The earliest JVM version we verify builds for via ASF Jenkins -->
<requireJavaVersion>
<version>[${java.min.version},)</version>
<message>Java is out of date.
HBase requirs at least version ${java.min.version} of the JDK to properly build from source.
You appear to be using an older version. You can use either "mvn -version" or
"mvn enforcer:display-info" to verify what version is active.
See the reference guide on building for more information: http://hbase.apache.org/book.html#build
</message>
</requireJavaVersion>
</rules>
</configuration>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- parent-module only plugins --> <!-- parent-module only plugins -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
@ -944,6 +981,9 @@
</maven.build.timestamp.format> </maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate> <buildDate>${maven.build.timestamp}</buildDate>
<compileSource>1.7</compileSource> <compileSource>1.7</compileSource>
<!-- Build dependencies -->
<maven.min.version>3.0.3</maven.min.version>
<java.min.version>${compileSource}</java.min.version>
<!-- Dependencies --> <!-- Dependencies -->
<hadoop-two.version>2.5.1</hadoop-two.version> <hadoop-two.version>2.5.1</hadoop-two.version>
<hadoop-three.version>3.0.0-SNAPSHOT</hadoop-three.version> <hadoop-three.version>3.0.0-SNAPSHOT</hadoop-three.version>