knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject [9/9] git commit: Fixes from testing and doc updates to match new jar locations.
Date Fri, 22 Mar 2013 19:12:12 GMT
Fixes from testing and doc updates to match new jar locations.


Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/3534d6a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/3534d6a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/3534d6a0

Branch: refs/heads/master
Commit: 3534d6a0c89ed339fb4cea69680b1069142bbcf3
Parents: 800736a
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Fri Mar 22 15:11:58 2013 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Fri Mar 22 15:11:58 2013 -0400

----------------------------------------------------------------------
 gateway-release/pom.xml                            |   18 ++++++++++++++-
 gateway-release/src/assembly.xml                   |    4 +-
 gateway-server-launcher/pom.xml                    |    2 +-
 .../src/main/resources/META-INF/launcher.cfg       |   16 -------------
 gateway-shell-launcher/pom.xml                     |    2 +-
 gateway-shell/pom.xml                              |    2 +
 .../src/main/resources/META-INF/launcher.cfg       |   16 -------------
 gateway-site/src/site/markdown/client.md.vm        |   16 ++++++------
 gateway-site/src/site/markdown/examples.md.vm      |    8 +++---
 .../src/site/markdown/getting-started.md.vm        |    6 ++--
 gateway-test-ldap-launcher/pom.xml                 |    2 +-
 .../src/main/resources/META-INF/launcher.cfg       |    2 +-
 gateway-test-ldap/pom.xml                          |    3 +-
 .../apache/hadoop/gateway/launcher/Command.java    |    5 +++-
 .../apache/hadoop/gateway/launcher/Invoker.java    |    5 ++-
 pom.xml                                            |    2 +-
 16 files changed, 50 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-release/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-release/pom.xml b/gateway-release/pom.xml
index bb09cad..79b3df3 100644
--- a/gateway-release/pom.xml
+++ b/gateway-release/pom.xml
@@ -102,6 +102,10 @@
         </dependency>
         <dependency>
             <groupId>${gateway-group}</groupId>
+            <artifactId>gateway-server-launcher</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${gateway-group}</groupId>
             <artifactId>gateway-service-hdfs</artifactId>
         </dependency>
         <dependency>
@@ -140,7 +144,19 @@
         <dependency>
             <groupId>${gateway-group}</groupId>
             <artifactId>gateway-shell</artifactId>
-            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${gateway-group}</groupId>
+            <artifactId>gateway-shell-launcher</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>${gateway-group}</groupId>
+            <artifactId>gateway-test-ldap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${gateway-group}</groupId>
+            <artifactId>gateway-test-ldap-launcher</artifactId>
         </dependency>
 
     </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-release/src/assembly.xml
----------------------------------------------------------------------
diff --git a/gateway-release/src/assembly.xml b/gateway-release/src/assembly.xml
index 0edb7ba..b85560a 100644
--- a/gateway-release/src/assembly.xml
+++ b/gateway-release/src/assembly.xml
@@ -40,7 +40,7 @@
         <dependencySet>
             <outputDirectory>dep</outputDirectory>
             <excludes>
-                <exclude>maven-test:*</exclude>
+                <exclude>${gateway-group}:*</exclude>
             </excludes>
         </dependencySet>
         <dependencySet>
@@ -58,7 +58,7 @@
         </dependencySet>
         <dependencySet>
             <outputDirectory>bin</outputDirectory>
-            <outputFileNameMapping>gateway.jar</outputFileNameMapping>
+            <outputFileNameMapping>server.jar</outputFileNameMapping>
             <includes>
                 <include>${gateway-group}:gateway-server-launcher</include>
             </includes>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-server-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-server-launcher/pom.xml b/gateway-server-launcher/pom.xml
index 6364667..1646e1c 100644
--- a/gateway-server-launcher/pom.xml
+++ b/gateway-server-launcher/pom.xml
@@ -53,7 +53,7 @@
                             </descriptorRefs>
                             <archive>
                                 <manifest>
-                                    <mainClass>test.launcher.Launcher</mainClass>
+                                    <mainClass>org.apache.hadoop.gateway.launcher.Launcher</mainClass>
                                 </manifest>
                             </archive>
                         </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-server/src/main/resources/META-INF/launcher.cfg
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/resources/META-INF/launcher.cfg b/gateway-server/src/main/resources/META-INF/launcher.cfg
deleted file mode 100644
index 419051c..0000000
--- a/gateway-server/src/main/resources/META-INF/launcher.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-main.class = org.apache.hadoop.gateway.GatewayServer
-class.path = ../lib; ../lib/*.jar; ../ext; ../ext/*.jar

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-shell-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-shell-launcher/pom.xml b/gateway-shell-launcher/pom.xml
index 533599e..d056e93 100644
--- a/gateway-shell-launcher/pom.xml
+++ b/gateway-shell-launcher/pom.xml
@@ -53,7 +53,7 @@
                             </descriptorRefs>
                             <archive>
                                 <manifest>
-                                    <mainClass>test.launcher.Launcher</mainClass>
+                                    <mainClass>org.apache.hadoop.gateway.launcher.Launcher</mainClass>
                                 </manifest>
                             </archive>
                         </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-shell/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-shell/pom.xml b/gateway-shell/pom.xml
index 7c028a3..183e5ae 100644
--- a/gateway-shell/pom.xml
+++ b/gateway-shell/pom.xml
@@ -30,6 +30,7 @@
     <artifactId>gateway-shell</artifactId>
     <version>0.2.0-SNAPSHOT</version>
 
+    <!--
     <profiles>
         <profile>
             <id>release</id>
@@ -61,6 +62,7 @@
             </build>
         </profile>
     </profiles>
+    -->
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-shell/src/main/resources/META-INF/launcher.cfg
----------------------------------------------------------------------
diff --git a/gateway-shell/src/main/resources/META-INF/launcher.cfg b/gateway-shell/src/main/resources/META-INF/launcher.cfg
deleted file mode 100644
index 1a377c0..0000000
--- a/gateway-shell/src/main/resources/META-INF/launcher.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-main.class = org.apache.hadoop.gateway.shell.Shell
-class.path = ../lib; ../lib/*.jar; ../ext; ../ext/*.jar

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-site/src/site/markdown/client.md.vm
----------------------------------------------------------------------
diff --git a/gateway-site/src/site/markdown/client.md.vm b/gateway-site/src/site/markdown/client.md.vm
index 12efa2f..1cbcd77 100644
--- a/gateway-site/src/site/markdown/client.md.vm
+++ b/gateway-site/src/site/markdown/client.md.vm
@@ -66,11 +66,11 @@ To simplify use, the distribution contains an embedded version of the
Groovy she
 
 The shell can be run interactively.
 
-    java -jar bin/shell-${gateway-version}.jar
+    java -jar bin/shell.jar
 
 The shell can also be used to execute a script by passing a single filename argument.
 
-    java -jar bin/shell-${gateway-version}.jar sample/SmokeTestJob.groovy
+    java -jar bin/shell.jar sample/SmokeTestJob.groovy
 
 When running interactively it may be helpful to reduce some of the output generated by the
shell console.
 Use the following command in the interactive shell to reduce that output.
@@ -88,7 +88,7 @@ Examples
 Once the shell can be launched the DSL can be used to interact with the gateway and Hadoop.
 Below is a very simple example of an interactive shell session to upload a file to HDFS.
 
-    java -jar bin/shell-${gateway-version}.jar
+    java -jar bin/shell.jar
     knox:000> hadoop = Hadoop.login( "https://localhost:8443/gateway/sample", "hdfs",
"hdfs-password" )
     knox:000> Hdfs.put( hadoop ).file( "README" ).to( "/tmp/example/README" ).now()
 
@@ -133,7 +133,7 @@ The shutdown command attempts to ensures that all asynchronous commands
have com
 
 All of the commands above could have been combined into a script file and executed as a single
line.
 
-    java -jar bin/shell-0.2.0.jar samples/Example.groovy
+    java -jar bin/shell.jar samples/Example.groovy
 
 This script file is available in the distribution but for convenience, this is the content.
 
@@ -551,15 +551,15 @@ Groovy
 The shell included in the distribution is basically an unmodified packaging of the Groovy
shell.
 Therefore these command are functionally equivalent if you have Groovy [installed][15].
 
-    java -jar bin/shell-${gateway-version}.jar sample/SmokeTestJob.groovy
-    groovy -cp bin/shell-${gateway-version}.jar sample/SmokeTestJob.groovy
+    java -jar bin/shell.jar sample/SmokeTestJob.groovy
+    groovy -cp bin/shell.jar sample/SmokeTestJob.groovy
 
 The interactive shell isn't exactly equivalent.
 However the only difference is that the shell-${gateway-version}.jar automatically executes
some additional imports that are useful for the KnoxShell DSL.
 So these two sets of commands should be functionality equivalent.
 ***However there is currently a class loading issue that prevents the groovysh command from
working propertly.***
 
-    java -jar bin/shell-${gateway-version}.jar
+    java -jar bin/shell.jar
 
     groovysh -cp bin/shell-${gateway-version}.jar
     import org.apache.hadoop.gateway.shell.Hadoop
@@ -570,7 +570,7 @@ So these two sets of commands should be functionality equivalent.
 
 Alternatively, you can use the Groovy Console which does not appear to have the same class
loading issue.
 
-    groovyConsole -cp bin/shell-${gateway-version}.jar
+    groovyConsole -cp bin/shell.jar
 
     import org.apache.hadoop.gateway.shell.Hadoop
     import org.apache.hadoop.gateway.shell.hdfs.Hdfs

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-site/src/site/markdown/examples.md.vm
----------------------------------------------------------------------
diff --git a/gateway-site/src/site/markdown/examples.md.vm b/gateway-site/src/site/markdown/examples.md.vm
index 672e538..8408c25 100644
--- a/gateway-site/src/site/markdown/examples.md.vm
+++ b/gateway-site/src/site/markdown/examples.md.vm
@@ -78,7 +78,7 @@ ways to do this depending upon your preference.
 
 You can use the "embedded" Groovy interpreter provided with the distribution.
 
-    java -jar bin/shell-${gateway-version}.jar samples/ExampleSubmitJob.groovy
+    java -jar bin/shell.jar samples/ExampleSubmitJob.groovy
 
 You can load the KnoxShell DSL script into the standard Groovy Console.
 
@@ -87,7 +87,7 @@ You can load the KnoxShell DSL script into the standard Groovy Console.
 You can manually type in the KnoxShell DSL script into the "embedded" Groovy
 interpreter provided with the distribution.
 
-    java -jar bin/shell-${gateway-version}.jar
+    java -jar bin/shell.jar
 
 Each line from the file below will need to be typed or copied into the
 interactive shell.
@@ -146,7 +146,7 @@ the job will be submitted via a Oozie workflow.  There are several ways
to do
 this depending upon your preference.
 
 You can use the "embedded" Groovy interpreter provided with the distribution.
-    java -jar bin/shell-${gateway-version}.jar samples/ExampleSubmitWorkflow.groovy
+    java -jar bin/shell.jar samples/ExampleSubmitWorkflow.groovy
 
 You can load the KnoxShell DSL script into the standard Groovy Console.
     groovyConsole -cp bin/shell-${gateway-version}.jar samples/ExampleSubmitWorkflow.groovy
@@ -154,7 +154,7 @@ You can load the KnoxShell DSL script into the standard Groovy Console.
 You can manually type in the KnoxShell DSL script into the "embedded" Groovy
 interpreter provided with the distribution.
 
-    java -jar bin/shell-${gateway-version}.jar
+    java -jar bin/shell.jar
 
 Each line from the file below will need to be typed or copied into the
 interactive shell.

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-site/src/site/markdown/getting-started.md.vm
----------------------------------------------------------------------
diff --git a/gateway-site/src/site/markdown/getting-started.md.vm b/gateway-site/src/site/markdown/getting-started.md.vm
index fd92712..d00e838 100644
--- a/gateway-site/src/site/markdown/getting-started.md.vm
+++ b/gateway-site/src/site/markdown/getting-started.md.vm
@@ -92,7 +92,7 @@ over if necessary.
 Start the LDAP server - pointing it to the config dir where it will find
 the users.ldif file in the conf directory.
 
-    java -jar bin/ldap-${gateway-version}.jar conf &
+    java -jar bin/ldap.jar conf &
 
 There are a number of log messages of the form `Created null.` that can
 safely be ignored.  Take note of the port on which it was started as this
@@ -102,7 +102,7 @@ can safely be ignored.
 
 ${HHH} 4. Start the Gateway server
 
-    java -jar bin/gateway-server-${gateway-version}.jar
+    java -jar bin/server.jar
 
 Take note of the port identified in the logging output as you will need this
 for accessing the gateway.
@@ -341,7 +341,7 @@ please send an email to the Knox user list (user AT knox.incubator.apache.org)
 with a subject prefix of [BUG] describing the issue.  Please include the
 results of this command in the email.
 
-    java -jar bin/gateway-${gateway-version}.jar -version
+    java -jar bin/server.jar -version
 
 in the Environment section.  Also include the version of Hadoop being used.
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-test-ldap-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test-ldap-launcher/pom.xml b/gateway-test-ldap-launcher/pom.xml
index 2e28228..d82af93 100644
--- a/gateway-test-ldap-launcher/pom.xml
+++ b/gateway-test-ldap-launcher/pom.xml
@@ -53,7 +53,7 @@
                             </descriptorRefs>
                             <archive>
                                 <manifest>
-                                    <mainClass>test.launcher.Launcher</mainClass>
+                                    <mainClass>org.apache.hadoop.gateway.launcher.Launcher</mainClass>
                                 </manifest>
                             </archive>
                         </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-test-ldap-launcher/src/main/resources/META-INF/launcher.cfg
----------------------------------------------------------------------
diff --git a/gateway-test-ldap-launcher/src/main/resources/META-INF/launcher.cfg b/gateway-test-ldap-launcher/src/main/resources/META-INF/launcher.cfg
index 25f9a19..1b047bd 100644
--- a/gateway-test-ldap-launcher/src/main/resources/META-INF/launcher.cfg
+++ b/gateway-test-ldap-launcher/src/main/resources/META-INF/launcher.cfg
@@ -12,5 +12,5 @@
 # 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.
-main.class = ororg.apache.hadoop.gateway.security.EmbeddedApacheDirectoryServer
+main.class = org.apache.hadoop.gateway.security.EmbeddedApacheDirectoryServer
 class.path = ../lib/*.jar;../dep/*.jar

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-test-ldap/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/pom.xml b/gateway-test-ldap/pom.xml
index 4bedc4a..3b879a2 100644
--- a/gateway-test-ldap/pom.xml
+++ b/gateway-test-ldap/pom.xml
@@ -68,6 +68,7 @@
         </plugins>
     </build>
 
+    <!--
     <profiles>
         <profile>
             <id>release</id>
@@ -87,7 +88,6 @@
                                     </manifestEntries>
                                 </transformer>
                             </transformers>
-                            <!-- Excludes signed manifests -->
                             <filters>
                                 <filter>
                                     <artifact>*:*</artifact>
@@ -112,6 +112,7 @@
             </build>
         </profile>
     </profiles>
+    -->
 
     <dependencies>
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
----------------------------------------------------------------------
diff --git a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
index e49d348..a0c4615 100644
--- a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
+++ b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
@@ -129,6 +129,9 @@ class Command {
         }
       }
     }
+//    for( URL url : urls ) {
+//      System.out.println( url );
+//    }
     return urls;
   }
 
@@ -141,7 +144,7 @@ class Command {
     private WildcardFilenameFilter( String filter ) {
       filter = filter.replace( ".", SAFE );
       filter = filter.replace( "*", ".*" );
-      filter.replace( SAFE, "\\." );
+      filter = filter.replace( SAFE, "\\." );
       pattern = Pattern.compile( filter );
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Invoker.java
----------------------------------------------------------------------
diff --git a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Invoker.java
b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Invoker.java
index b53aab2..32fb883 100644
--- a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Invoker.java
+++ b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Invoker.java
@@ -34,7 +34,7 @@ class Invoker {
     ClassLoader mainLoader = createClassLoader( command.classPath );
     Class mainClass = loadMainClass( mainLoader, command.mainClass );
     Method mainMethod = findMainMethod( mainClass, command.mainMethod );
-    invokeMainMethod( mainMethod, command.mainArgs );
+    invokeMainMethod( mainLoader, mainMethod, command.mainArgs );
   }
 
   private static void setSysProps( Properties properties ) {
@@ -59,7 +59,8 @@ class Invoker {
     return method;
   }
 
-  private static void invokeMainMethod( Method method, String[] args ) throws InvocationTargetException,
IllegalAccessException {
+  private static void invokeMainMethod( ClassLoader loader, Method method, String[] args
) throws InvocationTargetException, IllegalAccessException {
+    Thread.currentThread().setContextClassLoader( loader );
     method.invoke( method.getClass(), (Object)args );
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/3534d6a0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d186126..2176d72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -510,7 +510,7 @@
             <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-log4j12</artifactId>
-                <version>1.6.6</version>
+                <version>1.5.6</version>
             </dependency>
 
             <dependency>


Mime
View raw message