Repository: oozie
Updated Branches:
  refs/heads/master 30b29c81d -> d8aca11d8


http://git-wip-us.apache.org/repos/asf/oozie/blob/d8aca11d/tools/pom.xml
----------------------------------------------------------------------
diff --git a/tools/pom.xml b/tools/pom.xml
index 80fa425..50c30ed 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -35,12 +35,7 @@
         <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
-            <scope>compile</scope>
-        </dependency>
-         <dependency>
-             <groupId>org.apache.oozie</groupId>
-             <artifactId>oozie-hcatalog</artifactId>
-            <scope>test</scope>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.oozie</groupId>
@@ -48,11 +43,16 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-hadoop-test</artifactId>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-minicluster</artifactId>
             <scope>test</scope>
         </dependency>
-         <dependency>
+        <dependency>
             <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-core</artifactId>
             <classifier>tests</classifier>
@@ -71,79 +71,11 @@
         <dependency>
             <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-client</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.oozie</groupId>
-                    <artifactId>oozie-hadoop-auth</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>commons-cli</groupId>
-            <artifactId>commons-cli</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-core</artifactId>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>commons-el</groupId>
-                    <artifactId>commons-el</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-httpclient</groupId>
-                    <artifactId>commons-httpclient</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-compiler</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>tomcat</groupId>
-                    <artifactId>jasper-runtime</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>servlet-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.servlet.jsp</groupId>
-                    <artifactId>jsp-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.mail</groupId>
-                    <artifactId>mail</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>commons-logging</groupId>
-                    <artifactId>commons-logging-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>jetty</groupId>
-                    <artifactId>org.mortbay.jetty</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>jetty</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>jetty-util</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>jsp-api-2.1</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>servlet-api-2.5</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-hadoop</artifactId>
             <scope>provided</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/oozie/blob/d8aca11d/tools/src/main/bin/ooziedb.sh
----------------------------------------------------------------------
diff --git a/tools/src/main/bin/ooziedb.sh b/tools/src/main/bin/ooziedb.sh
index 68158d8..b57cff1 100644
--- a/tools/src/main/bin/ooziedb.sh
+++ b/tools/src/main/bin/ooziedb.sh
@@ -41,10 +41,22 @@ OOZIEDB_OPTS="${OOZIEDB_OPTS} -Doozie.log.dir=${OOZIE_LOG}";
 OOZIEDB_OPTS="${OOZIEDB_OPTS} -Doozie.data.dir=${OOZIE_DATA}";
 OOZIEDB_OPTS="${OOZIEDB_OPTS} -Dderby.stream.error.file=${OOZIE_LOG}/derby.log"
 
+#Create lib directory from war if lib doesn't exist
+if [ ! -d "${BASEDIR}/lib" ]; then
+  mkdir ${BASEDIR}/lib
+  unzip ${BASEDIR}/oozie.war WEB-INF/lib/*.jar -d ${BASEDIR}/lib > /dev/null
+  mv ${BASEDIR}/lib/WEB-INF/lib/*.jar ${BASEDIR}/lib/
+  rmdir ${BASEDIR}/lib/WEB-INF/lib
+  rmdir ${BASEDIR}/lib/WEB-INF
+fi
+
 OOZIECPPATH=""
 for i in "${BASEDIR}/libtools/"*.jar; do
   OOZIECPPATH="${OOZIECPPATH}:$i"
 done
+for i in "${BASEDIR}/lib/"*.jar; do
+  OOZIECPPATH="${OOZIECPPATH}:$i"
+done
 for i in "${BASEDIR}/libext/"*.jar; do
   OOZIECPPATH="${OOZIECPPATH}:$i"
 done

http://git-wip-us.apache.org/repos/asf/oozie/blob/d8aca11d/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 
b/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
index ca80d35..17a064e 100644
--- a/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
+++ b/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
@@ -180,7 +180,10 @@ public class OozieDBCLI {
 
     private void createDB(String sqlFile, boolean run) throws Exception {
         validateConnection();
-        validateDBSchema(false);
+        if (checkDBExists()) {
+            return;
+        }
+
         verifyOozieSysTable(false);
         createUpgradeDB(sqlFile, run, true);
         createOozieSysTable(sqlFile, run, DB_VERSION_FOR_5_0);
@@ -194,7 +197,9 @@ public class OozieDBCLI {
 
     private void upgradeDB(String sqlFile, boolean run) throws Exception {
         validateConnection();
-        validateDBSchema(true);
+        if (!checkDBExists()) {
+            throw new Exception("Oozie DB doesn't exist");
+        }
         String version = 
BuildInfo.getBuildInfo().getProperty(BuildInfo.BUILD_VERSION);
 
         if (!verifyOozieSysTable(false, false)) { // If OOZIE_SYS table doesn't
@@ -283,7 +288,9 @@ public class OozieDBCLI {
 
     private void postUpgradeDBTo40(String sqlFile, boolean run) throws 
Exception {
         validateConnection();
-        validateDBSchema(true);
+        if (!checkDBExists()) {
+            throw new Exception("Oozie DB doesn't exist");
+        }
         verifyOozieSysTable(true);
         verifyDBState();
         postUpgradeTasks(sqlFile, run, true);
@@ -862,8 +869,7 @@ public class OozieDBCLI {
     private static final String WORKFLOW_STATUS_QUERY =
         "select count(*) from WF_JOBS where status IN ('RUNNING', 
'SUSPENDED')";
 
-    private void validateDBSchema(boolean exists) throws Exception {
-        System.out.println((exists) ? "Check DB schema exists" : "Check DB 
schema does not exist");
+    private boolean checkDBExists() throws Exception {
         boolean schemaExists;
         Connection conn = createConnection();
         try {
@@ -880,10 +886,8 @@ public class OozieDBCLI {
         finally {
             conn.close();
         }
-        if (schemaExists != exists) {
-            throw new Exception("DB schema " + ((exists) ? "does not exist" : 
"exists"));
-        }
-        System.out.println("DONE");
+        System.out.println("DB schema " + ((schemaExists) ? "exists" : "does 
not exist"));
+        return schemaExists;
     }
 
     private final static String OOZIE_SYS_EXISTS = "select count(*) from 
OOZIE_SYS";
@@ -1093,7 +1097,10 @@ public class OozieDBCLI {
                            + 
BuildInfo.getBuildInfo().getProperty(BuildInfo.BUILD_VERSION));
         System.out.println();
         validateConnection();
-        validateDBSchema(true);
+        if (!checkDBExists()) {
+            throw new Exception("Oozie DB doesn't exist");
+        }
+
         try {
             verifyOozieSysTable(true);
         }

http://git-wip-us.apache.org/repos/asf/oozie/blob/d8aca11d/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/webapp/pom.xml b/webapp/pom.xml
index a410b10..928119c 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -34,6 +34,11 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-core</artifactId>
             <scope>compile</scope>
             <exclusions>
@@ -81,8 +86,17 @@
                     <groupId>org.mortbay.jetty</groupId>
                     <artifactId>servlet-api-2.5</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hive.hcatalog</groupId>
+                    <artifactId>hive-webhcat-java-client</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hive.hcatalog</groupId>
+                    <artifactId>hive-hcatalog-server-extensions</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
+
         <dependency>
             <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-docs</artifactId>
@@ -92,49 +106,11 @@
 
         <dependency>
             <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-pig</artifactId>
-            <scope>provided</scope>
-         </dependency>
-
-         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-hive</artifactId>
-            <scope>provided</scope>
-         </dependency>
-
-         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-sqoop</artifactId>
-            <scope>provided</scope>
-         </dependency>
-
-          <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-streaming</artifactId>
-            <scope>provided</scope>
-         </dependency>
-
-        <!-- All oozie sharelib has to be part of webapp, so that 
ShareLibService can copy all systemlib
-        jars when "oozie.action.ship.launcher.jar" is set to true -->
-        <dependency>
-            <groupId>org.apache.oozie</groupId>
             <artifactId>oozie-sharelib-oozie</artifactId>
             <scope>compile</scope>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-hcatalog</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-spark</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore</artifactId>
             <version>4.3</version>
@@ -145,18 +121,6 @@
             <artifactId>httpclient</artifactId>
             <version>4.3</version>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-distcp</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib-hive2</artifactId>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <build>
@@ -193,18 +157,50 @@
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-dependencies</id>
+                        <id>copy-sharelib</id>
                         <phase>prepare-package</phase>
                         <goals>
-                            <goal>copy-dependencies</goal>
+                            <goal>copy</goal>
                         </goals>
                         <configuration>
-                            <includeArtifactIds>
-                                
oozie-sharelib-pig,oozie-sharelib-hive,oozie-sharelib-sqoop,oozie-sharelib-streaming,
-                                
oozie-sharelib-oozie,oozie-sharelib-hcatalog,oozie-sharelib-distcp,oozie-sharelib-hive2,
-                                oozie-sharelib-spark
-                            </includeArtifactIds>
-                            <excludeTransitive>true</excludeTransitive>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    <artifactId>oozie-sharelib-pig</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-hive</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-sqoop</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-streaming</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-oozie</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-hcatalog</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-distcp</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-hive2</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    
<artifactId>oozie-sharelib-spark</artifactId>
+                                </artifactItem>
+                            </artifactItems>
                             
<outputDirectory>${project.build.directory}/oozie-webapp-${project.version}/WEB-INF/lib</outputDirectory>
                             <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
@@ -255,6 +251,34 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>uber</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-client</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.oozie</groupId>
+                    <artifactId>oozie-hadoop-auth</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.hive.hcatalog</groupId>
+                    <artifactId>hive-webhcat-java-client</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.hive.hcatalog</groupId>
+                    <artifactId>hive-hcatalog-server-extensions</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+            </dependencies>
+        </profile>
     </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/oozie/blob/d8aca11d/zookeeper-security-tests/pom.xml
----------------------------------------------------------------------
diff --git a/zookeeper-security-tests/pom.xml b/zookeeper-security-tests/pom.xml
index b24ce33..c2cfdd0 100644
--- a/zookeeper-security-tests/pom.xml
+++ b/zookeeper-security-tests/pom.xml
@@ -58,15 +58,26 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-hadoop</artifactId>
-            <scope>provided</scope>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
         </dependency>
         <dependency>
-           <groupId>org.apache.oozie</groupId>
-           <artifactId>oozie-hadoop-test</artifactId>
-           <scope>test</scope>
-       </dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-minicluster</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.antlr</groupId>
+            <artifactId>antlr-runtime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hive.hcatalog</groupId>
+            <artifactId>hive-webhcat-java-client</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

Reply via email to