Skip to content

Commit

Permalink
HADOOP-10530 Make hadoop build on Java7+ only (stevel)
Browse files Browse the repository at this point in the history
  • Loading branch information
steveloughran committed Dec 8, 2014
1 parent bb1fedf commit 275561d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 26 deletions.
4 changes: 2 additions & 2 deletions BUILDING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Build instructions for Hadoop
Requirements:

* Unix System
* JDK 1.6+
* JDK 1.7+
* Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0
Expand Down Expand Up @@ -204,7 +204,7 @@ Building on Windows
Requirements:

* Windows System
* JDK 1.6+
* JDK 1.7+
* Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0
Expand Down
4 changes: 2 additions & 2 deletions hadoop-assemblies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
<configuration>
<rules>
<requireMavenVersion>
<version>[3.0.0,)</version>
<version>${enforced.maven.version}</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.6</version>
<version>${enforced.java.version}</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down
17 changes: 0 additions & 17 deletions hadoop-common-project/hadoop-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@
</dependencies>

<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>
<id>jdk1.7</id>
<activation>
Expand Down
2 changes: 2 additions & 0 deletions hadoop-common-project/hadoop-common/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Release 2.7.0 - UNRELEASED

INCOMPATIBLE CHANGES

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

NEW FEATURES

HADOOP-10987. Provide an iterator-based listing API for FileSystem (kihwal)
Expand Down
19 changes: 15 additions & 4 deletions hadoop-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@
<zookeeper.version>3.4.6</zookeeper.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>

<dependencyManagement>
Expand Down Expand Up @@ -920,8 +931,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>${javac.version}</source>
<target>${javac.version}</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -1218,8 +1229,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<source>1.6</source>
<target>1.6</target>
<source>${javac.version}</source>
<target>${javac.version}</target>
<compilerArguments>
<Xlint/>
<Xmaxwarns>9999</Xmaxwarns>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<version>[3.0.2,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.6</version>
<version>[1.7,)</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down

0 comments on commit 275561d

Please sign in to comment.