Author: rohini
Date: Wed May 29 17:14:16 2013
New Revision: 1487551

URL: http://svn.apache.org/r1487551
Log:
OOZIE-1373 Oozie compilation fails with jdk7 (tucu, rohini via rohini)

Modified:
    oozie/trunk/docs/src/site/twiki/ENG_Building.twiki
    oozie/trunk/pom.xml
    oozie/trunk/release-log.txt
    oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java
    oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeDriver.java

Modified: oozie/trunk/docs/src/site/twiki/ENG_Building.twiki
URL: 
http://svn.apache.org/viewvc/oozie/trunk/docs/src/site/twiki/ENG_Building.twiki?rev=1487551&r1=1487550&r2=1487551&view=diff
==============================================================================
--- oozie/trunk/docs/src/site/twiki/ENG_Building.twiki (original)
+++ oozie/trunk/docs/src/site/twiki/ENG_Building.twiki Wed May 29 17:14:16 2013
@@ -50,6 +50,18 @@ Test that you can ssh without password:
 $ ssh localhost
 </verbatim>
 
+---++ Building with different Java Versions
+ 
+By default, the build configuration enforces that JDK 1.6.* is being used to 
compile and run the testcases.
+
+There are 2 build properties that can be used to change the JDK version 
requirements:
+
+   * *javaVersion* specifies the version of the JDK used to compile and run 
the testcases (default 1.6).
+   * *targetJavaVersion* specifies the version of the generated bytecode 
(default 1.6)
+   
+IMPORTANT: If setting =javaVersion= to =1.7=, still the generated bytecode is 
for JDK 1.6 unless =targetJavaVersion= 
+is also set to =1.7=.
+
 ---++ Building and Testing Oozie
 
 The JARs for the specified Hadoop and Pig versions must be available in one of 
the Maven repositories defined in Oozie

Modified: oozie/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/oozie/trunk/pom.xml?rev=1487551&r1=1487550&r2=1487551&view=diff
==============================================================================
--- oozie/trunk/pom.xml (original)
+++ oozie/trunk/pom.xml Wed May 29 17:14:16 2013
@@ -39,6 +39,9 @@
     </organization>
 
     <properties>
+        <javaVersion>1.6</javaVersion>
+        <targetJavaVersion>1.6</targetJavaVersion>
+
         <distMgmtSnapshotsName>Apache Development Snapshot 
Repository</distMgmtSnapshotsName>
         
<distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
 
@@ -834,7 +837,7 @@
                             <version>[3.0.0,)</version>
                         </requireMavenVersion>
                         <requireJavaVersion>
-                            <version>1.6</version>
+                            
<version>[${javaVersion}.0,${javaVersion}.1000}]</version>
                         </requireJavaVersion>
                         <requireOS>
                             <family>unix</family>
@@ -870,7 +873,7 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                     <source>1.6</source>
-                    <target>1.6</target>
+                    <target>${targetJavaVersion}</target>
                 </configuration>
             </plugin>
             <plugin>

Modified: oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1487551&r1=1487550&r2=1487551&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Wed May 29 17:14:16 2013
@@ -1,5 +1,6 @@
 -- Oozie 4.1.0 release (trunk - unreleased)
 
+OOZIE-1373 Oozie compilation fails with jdk7 (tucu, rohini via rohini)
 OOZIE-1296 SLA JMS Event Listener for publishing notifications related to SLA 
information (ryota via mona)
 OOZIE-1361 Remove SLACalculatorBean and add columns to SummaryBean indicating 
events processed and sla processed (mona)
 OOZIE-674 resolveInstanceRange doesn't work for EL extensions (shwethags via 
mona)

Modified: 
oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java?rev=1487551&r1=1487550&r2=1487551&view=diff
==============================================================================
--- oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java 
(original)
+++ oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeConnection.java 
Wed May 29 17:14:16 2013
@@ -47,6 +47,7 @@ import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Executor;
 
 import static org.mockito.Mockito.*;
 
@@ -326,6 +327,38 @@ public class FakeConnection implements C
 
     }
 
+    /**
+     * Null implementation for JDK7
+     */
+    public void setSchema(String schema) throws SQLException {
+    }
+
+    /**
+     * Null implementation for JDK7
+     */
+    public String getSchema() throws SQLException {
+        return null;
+    }
+
+    /**
+     * Null implementation for JDK7
+     */
+    public void abort(Executor executor) throws SQLException {
+    }
+
+    /**
+     * Null implementation for JDK7
+     */
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws 
SQLException {
+    }
+
+    /**
+     * Null implementation for JDK7
+     */
+    public int getNetworkTimeout() throws SQLException {
+        return 0;
+    }
+
     @SuppressWarnings( "deprecation" )
     private static class FakeResultSet implements ResultSet {
 
@@ -1284,5 +1317,20 @@ public class FakeConnection implements C
             return false;
         }
 
+        /**
+         * Null implementation for JDK7
+         */
+        public <T> T getObject(int columnIndex, Class<T> type) throws 
SQLException {
+            return null;
+        }
+
+        /**
+         * Null implementation for JDK7
+         */
+        public <T> T getObject(String columnLabel, Class<T> type) throws 
SQLException {
+            return null;
+        }
+
     }
+
 }

Modified: oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeDriver.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeDriver.java?rev=1487551&r1=1487550&r2=1487551&view=diff
==============================================================================
--- oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeDriver.java 
(original)
+++ oozie/trunk/tools/src/test/java/org/apache/oozie/tools/FakeDriver.java Wed 
May 29 17:14:16 2013
@@ -22,7 +22,9 @@ import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.DriverPropertyInfo;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Properties;
+import java.util.logging.Logger;
 
 public class FakeDriver implements Driver {
 
@@ -55,4 +57,11 @@ public class FakeDriver implements Drive
     public boolean jdbcCompliant() {
         return false;
     }
-}
\ No newline at end of file
+
+    /**
+     * Null implementation for JDK7
+     */
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        return null;
+    }
+}


Reply via email to