Author: tucu
Date: Wed Nov 23 21:49:54 2011
New Revision: 1205619

URL: http://svn.apache.org/viewvc?rev=1205619&view=rev
Log:
OOZIE-610 Oozie system share lib should have jars per action type. (tucu)

Added:
    incubator/oozie/trunk/sharelib/pig/
    incubator/oozie/trunk/sharelib/pig/pom.xml
    incubator/oozie/trunk/sharelib/streaming/
    incubator/oozie/trunk/sharelib/streaming/pom.xml
    incubator/oozie/trunk/src/main/assemblies/partial-sharelib.xml
Modified:
    incubator/oozie/trunk/core/pom.xml
    
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
    
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/MapReduceActionExecutor.java
    
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/PigActionExecutor.java
    
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/WorkflowAppService.java
    incubator/oozie/trunk/docs/src/site/twiki/DG_Examples.twiki
    incubator/oozie/trunk/docs/src/site/twiki/DG_QuickStart.twiki
    incubator/oozie/trunk/examples/pom.xml
    incubator/oozie/trunk/examples/src/main/apps/custom-main/job.properties
    incubator/oozie/trunk/examples/src/main/apps/demo/job.properties
    incubator/oozie/trunk/examples/src/main/apps/hadoop-el/job.properties
    incubator/oozie/trunk/examples/src/main/apps/java-main/job.properties
    incubator/oozie/trunk/examples/src/main/apps/pig/job.properties
    incubator/oozie/trunk/examples/src/main/apps/streaming/job.properties
    incubator/oozie/trunk/pom.xml
    incubator/oozie/trunk/release-log.txt
    incubator/oozie/trunk/sharelib/pom.xml
    incubator/oozie/trunk/src/main/assemblies/distro.xml
    incubator/oozie/trunk/src/main/assemblies/examples.xml
    incubator/oozie/trunk/src/main/assemblies/sharelib.xml

Modified: incubator/oozie/trunk/core/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/pom.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/core/pom.xml (original)
+++ incubator/oozie/trunk/core/pom.xml Wed Nov 23 21:49:54 2011
@@ -85,12 +85,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
@@ -139,24 +133,6 @@
             <scope>compile</scope>
         </dependency>
 
-               <dependency>
-                       <groupId>org.python</groupId>
-                       <artifactId>jython</artifactId>
-                       <scope>test</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.antlr</groupId>
-                       <artifactId>antlr-runtime</artifactId>
-                       <scope>test</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.google.guava</groupId>
-                       <artifactId>guava</artifactId>
-                       <scope>test</scope>
-               </dependency>
-
         <!--
         Oozie web-app module must exclude it.
          -->
@@ -201,6 +177,18 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-sharelib-pig</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-sharelib-streaming</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
     </dependencies>
 
     <build>

Modified: 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
 (original)
+++ 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
 Wed Nov 23 21:49:54 2011
@@ -18,6 +18,7 @@
 package org.apache.oozie.action.hadoop;
 
 import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -38,6 +39,7 @@ import java.util.Map.Entry;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.filecache.DistributedCache;
+import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.AccessControlException;
@@ -348,13 +350,49 @@ public class JavaActionExecutor extends 
         }
     }
 
+    protected void addActionShareLib(Context context, Element actionXml, Path 
appPath, Configuration conf)
+            throws ActionExecutorException {
+        String actionShareLibPostfix = getShareLibPostFix(context, actionXml);
+        if (actionShareLibPostfix != null) {
+            try {
+                Path systemLibPath = 
Services.get().get(WorkflowAppService.class).getSystemLibPath();
+                if (systemLibPath != null) {
+                    Path actionLibPath = new Path(systemLibPath, 
actionShareLibPostfix);
+                    XConfiguration wfJobConf = new XConfiguration(new 
StringReader(context.getWorkflow().getConf()));
+                    if (wfJobConf.getBoolean(OozieClient.USE_SYSTEM_LIBPATH, 
false)) {
+                        String user = conf.get("user.name");
+                        String group = conf.get("group.name");
+                        FileSystem fs =
+                            
Services.get().get(HadoopAccessorService.class).createFileSystem(user, group, 
conf);
+                        if (fs.exists(actionLibPath)) {
+                            FileStatus[] files = fs.listStatus(actionLibPath);
+                            for (FileStatus file : files) {
+                                addToCache(conf, appPath, 
file.getPath().toUri().getPath(), false);
+                            }
+                        }
+                    }
+                }
+            }
+            catch (HadoopAccessorException ex){
+                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED,
+                                                  
ex.getErrorCode().toString(), ex.getMessage());
+            }
+            catch (IOException ex){
+                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED,
+                                                  "It should never happen", 
ex.getMessage());
+            }
+        }
+    }
+
     @SuppressWarnings("unchecked")
     void setLibFilesArchives(Context context, Element actionXml, Path appPath, 
Configuration conf)
             throws ActionExecutorException {
         Configuration proto = context.getProtoActionConf();
 
+        // launcher JAR
         addToCache(conf, appPath, getOozieLauncherJar(context), false);
 
+        // Workflow lib/
         String[] paths = 
proto.getStrings(WorkflowAppService.APP_LIB_PATH_LIST);
         if (paths != null) {
             for (String path : paths) {
@@ -362,6 +400,7 @@ public class JavaActionExecutor extends 
             }
         }
 
+        // files and archives defined in the action
         for (Element eProp : (List<Element>) actionXml.getChildren()) {
             if (eProp.getName().equals("file")) {
                 String path = eProp.getTextTrim();
@@ -374,6 +413,9 @@ public class JavaActionExecutor extends 
                 }
             }
         }
+
+        // Oozie sharelib (for the action)
+        addActionShareLib(context, actionXml, appPath, conf);
     }
 
     protected String getLauncherMain(Configuration launcherConf, Element 
actionXml) {
@@ -983,4 +1025,22 @@ public class JavaActionExecutor extends 
         return FINAL_STATUS.contains(externalStatus);
     }
 
+    /**
+     * Return the sharelib postfix for the action.
+     * <p/>
+     * If <code>NULL</code> or emtpy, it means that the action does not use 
the action
+     * sharelib.
+     * <p/>
+     * If a non-empty string, i.e. <code>foo</code>, it means the action uses 
the
+     * action sharelib subdirectory <code>foo</code> and all JARs in the 
<code>foo</code>
+     * directory will be in the action classpath.
+     *
+     * @param context executor context.
+     * @param actionXml the action XML.
+     * @return the action sharelib post fix, this implementation returns 
<code>NULL</code>.
+     */
+    protected String getShareLibPostFix(Context context, Element actionXml) {
+        return null;
+    }
+
 }

Modified: 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/MapReduceActionExecutor.java
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/MapReduceActionExecutor.java?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/MapReduceActionExecutor.java
 (original)
+++ 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/MapReduceActionExecutor.java
 Wed Nov 23 21:49:54 2011
@@ -32,6 +32,7 @@ import org.apache.oozie.util.XConfigurat
 import org.apache.oozie.util.XLog;
 import org.apache.oozie.util.XmlUtils;
 import org.jdom.Element;
+import org.jdom.JDOMException;
 import org.jdom.Namespace;
 import org.json.simple.JSONObject;
 
@@ -195,4 +196,17 @@ public class MapReduceActionExecutor ext
         return groups;
     }
 
+    /**
+     * Return the sharelib postfix for the action.
+     *
+     * @param context executor context.
+     * @param actionXml the action XML.
+     * @return the action sharelib post fix, this implementation returns 
<code>NULL</code>
+     * or <code>streaming</code> if the mapreduce action is streaming.
+     */
+    protected String getShareLibPostFix(Context context, Element actionXml) {
+        Namespace ns = actionXml.getNamespace();
+        return (actionXml.getChild("streaming", ns) != null) ? 
"mapreduce-streaming" : null;
+    }
+
 }

Modified: 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/PigActionExecutor.java
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/PigActionExecutor.java?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/PigActionExecutor.java
 (original)
+++ 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/PigActionExecutor.java
 Wed Nov 23 21:49:54 2011
@@ -129,4 +129,15 @@ public class PigActionExecutor extends J
         return true;
     }
 
+    /**
+     * Return the sharelib postfix for the action.
+     *
+     * @param context executor context.
+     * @param actionXml the action XML.
+     * @return the action sharelib post fix, this implementation returns 
<code>pig</code>.
+     */
+    protected String getShareLibPostFix(Context context, Element actionXml) {
+        return "pig";
+    }
+
 }

Modified: 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/WorkflowAppService.java
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/WorkflowAppService.java?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/WorkflowAppService.java
 (original)
+++ 
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/WorkflowAppService.java
 Wed Nov 23 21:49:54 2011
@@ -189,11 +189,6 @@ public abstract class WorkflowAppService
                 }
             }
 
-            if (systemLibPath != null && 
jobConf.getBoolean(OozieClient.USE_SYSTEM_LIBPATH, false)) {
-                List<String> libFilePaths = getLibFiles(fs, systemLibPath);
-                filePaths.addAll(libFilePaths);
-            }
-
             conf.setStrings(APP_LIB_PATH_LIST, filePaths.toArray(new 
String[filePaths.size()]));
 
             //Add all properties start with 'oozie.'
@@ -278,4 +273,13 @@ public abstract class WorkflowAppService
             return true;
         }
     }
+
+    /**
+     * Returns Oozie system libpath.
+     *
+     * @return Oozie system libpath (sharelib) in HDFS if present, otherwise 
it returns <code>NULL</code>.
+     */
+    public Path getSystemLibPath() {
+        return systemLibPath;
+    }
 }

Modified: incubator/oozie/trunk/docs/src/site/twiki/DG_Examples.twiki
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/docs/src/site/twiki/DG_Examples.twiki?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/docs/src/site/twiki/DG_Examples.twiki (original)
+++ incubator/oozie/trunk/docs/src/site/twiki/DG_Examples.twiki Wed Nov 23 
21:49:54 2011
@@ -25,6 +25,8 @@ copied.
 
 ---+++ Running the Examples
 
+For the Streaming and Pig example, the [[DG_QuickStart#OozieShareLib][Oozie 
Share Library]] must be installed in HDFS.
+
 Add Oozie =bin/= to the environment PATH.
 
 The examples assume the JobTracker is =localhost:9001= and the NameNode is 
=hdfs://localhost:9000=. If the actual
@@ -82,17 +84,6 @@ $
 $ oozie job -info 14-20090525161321-oozie-tucu
 </verbatim>
 
----++ Examples Share Lib
-
-The streaming, pig, demo and custom-main examples pick up the streaming and 
pig JARs from an example share lib
-bundled with the examples =examples/apps/examples-lib/= .
-
-The setting for the share lib is done in the job properties using the 
=oozie.libpath= property.
-
-<verbatim>
-oozie.libpath=/user/${user.name}/examples/apps/examples-lib
-</verbatim>
-
 ---++ Java API Example
 
 Oozie provides a 
=[[./apidocs/org/org/apache/oozie/client/package-summary.html][Java Client 
API]] that simplifies

Modified: incubator/oozie/trunk/docs/src/site/twiki/DG_QuickStart.twiki
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/docs/src/site/twiki/DG_QuickStart.twiki?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/docs/src/site/twiki/DG_QuickStart.twiki (original)
+++ incubator/oozie/trunk/docs/src/site/twiki/DG_QuickStart.twiki Wed Nov 23 
21:49:54 2011
@@ -85,6 +85,7 @@ command line tool.
 NOTE: The Oozie server installation includes the Oozie client. The Oozie 
client should be installed in remote machines
 only.
 
+#OozieShareLib
 ---++ Oozie Share Lib Installation
 
 Expand the =oozie-sharelib= TAR.GZ file bundled with the distribution.

Modified: incubator/oozie/trunk/examples/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/pom.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/pom.xml (original)
+++ incubator/oozie/trunk/examples/pom.xml Wed Nov 23 21:49:54 2011
@@ -63,7 +63,13 @@
 
         <dependency>
             <groupId>org.apache.oozie</groupId>
-            <artifactId>oozie-sharelib</artifactId>
+            <artifactId>oozie-sharelib-pig</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-sharelib-streaming</artifactId>
             <scope>compile</scope>
         </dependency>
 

Modified: 
incubator/oozie/trunk/examples/src/main/apps/custom-main/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/custom-main/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/custom-main/job.properties 
(original)
+++ incubator/oozie/trunk/examples/src/main/apps/custom-main/job.properties Wed 
Nov 23 21:49:54 2011
@@ -21,7 +21,5 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
-
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/custom-main
 

Modified: incubator/oozie/trunk/examples/src/main/apps/demo/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/demo/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/demo/job.properties (original)
+++ incubator/oozie/trunk/examples/src/main/apps/demo/job.properties Wed Nov 23 
21:49:54 2011
@@ -21,7 +21,5 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
-
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/demo
 sshAction=rename

Modified: incubator/oozie/trunk/examples/src/main/apps/hadoop-el/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/hadoop-el/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/hadoop-el/job.properties 
(original)
+++ incubator/oozie/trunk/examples/src/main/apps/hadoop-el/job.properties Wed 
Nov 23 21:49:54 2011
@@ -21,6 +21,4 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
-
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/hadoop-el

Modified: incubator/oozie/trunk/examples/src/main/apps/java-main/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/java-main/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/java-main/job.properties 
(original)
+++ incubator/oozie/trunk/examples/src/main/apps/java-main/job.properties Wed 
Nov 23 21:49:54 2011
@@ -21,6 +21,4 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
-
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/java-main

Modified: incubator/oozie/trunk/examples/src/main/apps/pig/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/pig/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/pig/job.properties (original)
+++ incubator/oozie/trunk/examples/src/main/apps/pig/job.properties Wed Nov 23 
21:49:54 2011
@@ -21,6 +21,6 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
+oozie.use.system.libpath=true
 
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/pig

Modified: incubator/oozie/trunk/examples/src/main/apps/streaming/job.properties
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/examples/src/main/apps/streaming/job.properties?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/examples/src/main/apps/streaming/job.properties 
(original)
+++ incubator/oozie/trunk/examples/src/main/apps/streaming/job.properties Wed 
Nov 23 21:49:54 2011
@@ -21,6 +21,6 @@ jobTracker=localhost:8021
 queueName=default
 examplesRoot=examples
 
-oozie.libpath=/user/${user.name}/${examplesRoot}/apps/examples-lib
+oozie.use.system.libpath=true
 
 
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/streaming

Modified: incubator/oozie/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/pom.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/pom.xml (original)
+++ incubator/oozie/trunk/pom.xml Wed Nov 23 21:49:54 2011
@@ -167,6 +167,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.oozie</groupId>
+                <artifactId>oozie-sharelib-streaming</artifactId>
+                <version>3.2.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.oozie</groupId>
+                <artifactId>oozie-sharelib-pig</artifactId>
+                <version>3.2.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.oozie</groupId>
                 <artifactId>oozie-docs</artifactId>
                 <version>3.2.0-SNAPSHOT</version>
                 <type>war</type>
@@ -455,23 +465,23 @@
                 <version>9.0-801.jdbc4</version>
             </dependency>
 
-                       <dependency>
-                               <groupId>org.python</groupId>
-                               <artifactId>jython</artifactId>
-                               <version>2.5.0</version>
-                       </dependency>
-
-                       <dependency>
-                               <groupId>org.antlr</groupId>
-                               <artifactId>antlr-runtime</artifactId>
-                               <version>3.4</version>
-                       </dependency>
-
-                       <dependency>
-                               <groupId>com.google.guava</groupId>
-                               <artifactId>guava</artifactId>
-                               <version>r09</version>
-                       </dependency>
+            <dependency>
+                <groupId>org.python</groupId>
+                <artifactId>jython</artifactId>
+                <version>2.5.0</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.antlr</groupId>
+                <artifactId>antlr-runtime</artifactId>
+                <version>3.4</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>r09</version>
+            </dependency>
 
         </dependencies>
     </dependencyManagement>
@@ -502,7 +512,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-assembly-plugin</artifactId>
-                    <version>2.2-beta-3</version>
+                    <version>2.2.1</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
@@ -536,11 +546,21 @@
                     <artifactId>maven-war-plugin</artifactId>
                     <version>2.1</version>
                 </plugin>
-               <plugin>
+                <plugin>
                     <groupId>org.apache.rat</groupId>
                     <artifactId>apache-rat-plugin</artifactId>
                     <version>0.7</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>2.5</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.5</version>
+                </plugin>
             </plugins>
         </pluginManagement>
 

Modified: incubator/oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Wed Nov 23 21:49:54 2011
@@ -1,5 +1,6 @@
 -- Oozie 3.2.0 release
 
+OOZIE-610 Oozie system share lib should have jars per action type. (tucu)
 OOZIE-565 Make Oozie compile against Hadoop 0.23. (tucu)
 OOZIE-609 Oozie services fail to start with log enabled. (tucu)
 OOZIE-607 Pig POM brings in several unneeded dependencies. (tucu)

Added: incubator/oozie/trunk/sharelib/pig/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/sharelib/pig/pom.xml?rev=1205619&view=auto
==============================================================================
--- incubator/oozie/trunk/sharelib/pig/pom.xml (added)
+++ incubator/oozie/trunk/sharelib/pig/pom.xml Wed Nov 23 21:49:54 2011
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.oozie</groupId>
+        <artifactId>oozie-main</artifactId>
+        <version>3.2.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <artifactId>oozie-sharelib-pig</artifactId>
+    <description>Oozie Share Lib Pig</description>
+    <name>Oozie Share Lib Pig</name>
+    <packaging>jar</packaging>
+
+    <properties>
+        <sharelib.action.postfix>pig</sharelib.action.postfix>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.pig</groupId>
+            <artifactId>pig</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>jline</groupId>
+            <artifactId>jline</artifactId>
+            <scope>compile</scope>
+        </dependency>
+               <dependency>
+                       <groupId>org.python</groupId>
+                       <artifactId>jython</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.antlr</groupId>
+                       <artifactId>antlr-runtime</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>com.google.guava</groupId>
+                       <artifactId>guava</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <finalName>partial-sharelib</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <descriptors>
+                        
<descriptor>../../src/main/assemblies/partial-sharelib.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Modified: incubator/oozie/trunk/sharelib/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/sharelib/pom.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/sharelib/pom.xml (original)
+++ incubator/oozie/trunk/sharelib/pom.xml Wed Nov 23 21:49:54 2011
@@ -26,44 +26,12 @@
     <artifactId>oozie-sharelib</artifactId>
     <description>Oozie Share Lib</description>
     <name>Oozie Share Lib</name>
-    <packaging>jar</packaging>
+    <packaging>pom</packaging>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.pig</groupId>
-            <artifactId>pig</artifactId>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.hadoop</groupId>
-                    <artifactId>hadoop-core</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>jline</groupId>
-            <artifactId>jline</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-
-               <dependency>
-                       <groupId>org.python</groupId>
-                       <artifactId>jython</artifactId>
-                       <scope>runtime</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.antlr</groupId>
-                       <artifactId>antlr-runtime</artifactId>
-                       <scope>runtime</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.google.guava</groupId>
-                       <artifactId>guava</artifactId>
-                       <scope>runtime</scope>
-               </dependency>
-    </dependencies>
+    <modules>
+        <module>streaming</module>
+        <module>pig</module>
+    </modules>
 
     <build>
         <resources>
@@ -75,13 +43,33 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
+                    <appendAssemblyId>false</appendAssemblyId>
                     <descriptors>
                         
<descriptor>../src/main/assemblies/sharelib.xml</descriptor>
                     </descriptors>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

Added: incubator/oozie/trunk/sharelib/streaming/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/sharelib/streaming/pom.xml?rev=1205619&view=auto
==============================================================================
--- incubator/oozie/trunk/sharelib/streaming/pom.xml (added)
+++ incubator/oozie/trunk/sharelib/streaming/pom.xml Wed Nov 23 21:49:54 2011
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.oozie</groupId>
+        <artifactId>oozie-main</artifactId>
+        <version>3.2.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <artifactId>oozie-sharelib-streaming</artifactId>
+    <description>Oozie Share Lib Streaming</description>
+    <name>Oozie Share Lib Streaming</name>
+    <packaging>jar</packaging>
+
+    <properties>
+        <sharelib.action.postfix>mapreduce-streaming</sharelib.action.postfix>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-streaming</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <finalName>partial-sharelib</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <descriptors>
+                        
<descriptor>../../src/main/assemblies/partial-sharelib.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Modified: incubator/oozie/trunk/src/main/assemblies/distro.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/src/main/assemblies/distro.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/src/main/assemblies/distro.xml (original)
+++ incubator/oozie/trunk/src/main/assemblies/distro.xml Wed Nov 23 21:49:54 
2011
@@ -126,9 +126,8 @@
         </file>
         <!-- Oozie sharelib TAR.GZ  -->
         <file>
-            
<source>${basedir}/../sharelib/target/oozie-sharelib-${project.version}-sharelib.tar.gz</source>
+            
<source>${basedir}/../sharelib/target/oozie-sharelib-${project.version}.tar.gz</source>
             <outputDirectory>/</outputDirectory>
-            <destName>oozie-sharelib-${project.version}.tar.gz</destName>
             <fileMode>0444</fileMode>
         </file>
     </files>

Modified: incubator/oozie/trunk/src/main/assemblies/examples.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/src/main/assemblies/examples.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/src/main/assemblies/examples.xml (original)
+++ incubator/oozie/trunk/src/main/assemblies/examples.xml Wed Nov 23 21:49:54 
2011
@@ -113,16 +113,4 @@
         </file> 
     </files>
 
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/examples/apps/examples-lib</outputDirectory>
-            <unpack>false</unpack>
-            <excludes>
-                <exclude>${project.groupId}:oozie-examples</exclude>
-                <exclude>${project.groupId}:oozie-sharelib</exclude>
-            </excludes>
-            <useTransitiveDependencies/>
-        </dependencySet>
-    </dependencySets>
-
 </assembly>

Added: incubator/oozie/trunk/src/main/assemblies/partial-sharelib.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/src/main/assemblies/partial-sharelib.xml?rev=1205619&view=auto
==============================================================================
--- incubator/oozie/trunk/src/main/assemblies/partial-sharelib.xml (added)
+++ incubator/oozie/trunk/src/main/assemblies/partial-sharelib.xml Wed Nov 23 
21:49:54 2011
@@ -0,0 +1,35 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<assembly>
+    <id>sharelib</id>
+    <formats>
+        <format>dir</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <dependencySets>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            
<outputDirectory>/share/lib/${sharelib.action.postfix}</outputDirectory>
+            <unpack>false</unpack>
+            <useTransitiveDependencies>true</useTransitiveDependencies>
+            <useTransitiveFiltering>true</useTransitiveFiltering>
+        </dependencySet>
+    </dependencySets>
+
+</assembly>

Modified: incubator/oozie/trunk/src/main/assemblies/sharelib.xml
URL: 
http://svn.apache.org/viewvc/incubator/oozie/trunk/src/main/assemblies/sharelib.xml?rev=1205619&r1=1205618&r2=1205619&view=diff
==============================================================================
--- incubator/oozie/trunk/src/main/assemblies/sharelib.xml (original)
+++ incubator/oozie/trunk/src/main/assemblies/sharelib.xml Wed Nov 23 21:49:54 
2011
@@ -30,15 +30,15 @@
         </file>
     </files>
 
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/share/lib</outputDirectory>
-            <unpack>false</unpack>
-            <excludes>
-                <exclude>${project.groupId}:oozie-sharelib</exclude>
-            </excludes>
-            <useTransitiveDependencies/>
-        </dependencySet>
-    </dependencySets>
+    <fileSets>
+        <fileSet>
+            <directory>${basedir}/pig/target/partial-sharelib</directory>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/streaming/target/partial-sharelib</directory>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
 
 </assembly>


Reply via email to