HADOOP-10530 Make hadoop build on Java7+ only (stevel)

This commit is contained in:
Steve Loughran 2014-12-08 15:30:34 +00:00
parent bb1fedfbc3
commit 275561d848
6 changed files with 22 additions and 26 deletions

View File

@ -4,7 +4,7 @@ Build instructions for Hadoop
Requirements: Requirements:
* Unix System * Unix System
* JDK 1.6+ * JDK 1.7+
* Maven 3.0 or later * Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs) * Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0 * ProtocolBuffer 2.5.0
@ -204,7 +204,7 @@ Building on Windows
Requirements: Requirements:
* Windows System * Windows System
* JDK 1.6+ * JDK 1.7+
* Maven 3.0 or later * Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs) * Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0 * ProtocolBuffer 2.5.0

View File

@ -45,10 +45,10 @@
<configuration> <configuration>
<rules> <rules>
<requireMavenVersion> <requireMavenVersion>
<version>[3.0.0,)</version> <version>${enforced.maven.version}</version>
</requireMavenVersion> </requireMavenVersion>
<requireJavaVersion> <requireJavaVersion>
<version>1.6</version> <version>${enforced.java.version}</version>
</requireJavaVersion> </requireJavaVersion>
</rules> </rules>
</configuration> </configuration>

View File

@ -39,23 +39,6 @@
</dependencies> </dependencies>
<profiles> <profiles>
<profile>
<id>os.linux</id>
<activation>
<os>
<family>!Mac</family>
</os>
</activation>
<dependencies>
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile> <profile>
<id>jdk1.7</id> <id>jdk1.7</id>
<activation> <activation>

View File

@ -4,6 +4,8 @@ Release 2.7.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES
HADOOP-10530 Make hadoop build on Java7+ only (stevel)
NEW FEATURES NEW FEATURES
HADOOP-10987. Provide an iterator-based listing API for FileSystem (kihwal) HADOOP-10987. Provide an iterator-based listing API for FileSystem (kihwal)

View File

@ -73,6 +73,17 @@
<zookeeper.version>3.4.6</zookeeper.version> <zookeeper.version>3.4.6</zookeeper.version>
<tomcat.version>6.0.41</tomcat.version> <tomcat.version>6.0.41</tomcat.version>
<!-- define the Java language version used by the compiler -->
<javac.version>1.7</javac.version>
<!-- The java version enforced by the maven enforcer -->
<!-- more complex patterns can be used here, such as
[${javac.version})
for an open-ended enforcement
-->
<enforced.java.version>[${javac.version},)</enforced.java.version>
<enforced.maven.version>[3.0.2,)</enforced.maven.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@ -920,8 +931,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version> <version>2.5.1</version>
<configuration> <configuration>
<source>1.6</source> <source>${javac.version}</source>
<target>1.6</target> <target>${javac.version}</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -1218,8 +1229,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<fork>true</fork> <fork>true</fork>
<source>1.6</source> <source>${javac.version}</source>
<target>1.6</target> <target>${javac.version}</target>
<compilerArguments> <compilerArguments>
<Xlint/> <Xlint/>
<Xmaxwarns>9999</Xmaxwarns> <Xmaxwarns>9999</Xmaxwarns>

View File

@ -124,7 +124,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<version>[3.0.2,)</version> <version>[3.0.2,)</version>
</requireMavenVersion> </requireMavenVersion>
<requireJavaVersion> <requireJavaVersion>
<version>1.6</version> <version>[1.7,)</version>
</requireJavaVersion> </requireJavaVersion>
</rules> </rules>
</configuration> </configuration>