knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: Got rid of Guava too. Also found where that annoying EmbeddedApacheDirectoryServer temp dir was being created and fixed that too.
Date Fri, 22 Mar 2013 21:36:14 GMT
Updated Branches:
  refs/heads/master 2384e61b8 -> 75960e1e0


Got rid of Guava too.  Also found where that annoying EmbeddedApacheDirectoryServer temp dir
was being created and fixed that too.


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

Branch: refs/heads/master
Commit: 75960e1e04c7c681c9ded552fbe06e0c45f2bd39
Parents: 2384e61
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Fri Mar 22 17:36:08 2013 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Fri Mar 22 17:36:08 2013 -0400

----------------------------------------------------------------------
 gateway-server/pom.xml                             |    2 +
 gateway-test-ldap/pom.xml                          |    2 +
 .../security/EmbeddedApacheDirectoryServer.java    |   24 +++++++++-----
 gateway-test/pom.xml                               |    2 +
 pom.xml                                            |   10 ++++++
 5 files changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75960e1e/gateway-server/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-server/pom.xml b/gateway-server/pom.xml
index 332089d..bd81faf 100644
--- a/gateway-server/pom.xml
+++ b/gateway-server/pom.xml
@@ -327,10 +327,12 @@
             <scope>test</scope>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
+        -->
 
         <dependency>
             <groupId>com.mycila.xmltool</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75960e1e/gateway-test-ldap/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/pom.xml b/gateway-test-ldap/pom.xml
index 3b879a2..d1e201e 100644
--- a/gateway-test-ldap/pom.xml
+++ b/gateway-test-ldap/pom.xml
@@ -126,10 +126,12 @@
             <artifactId>slf4j-log4j12</artifactId>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
+        -->
 
         <dependency>
             <groupId>org.apache.directory.server</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75960e1e/gateway-test-ldap/src/main/java/org/apache/hadoop/gateway/security/EmbeddedApacheDirectoryServer.java
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/main/java/org/apache/hadoop/gateway/security/EmbeddedApacheDirectoryServer.java
b/gateway-test-ldap/src/main/java/org/apache/hadoop/gateway/security/EmbeddedApacheDirectoryServer.java
index 9e851c9..03af4ec 100644
--- a/gateway-test-ldap/src/main/java/org/apache/hadoop/gateway/security/EmbeddedApacheDirectoryServer.java
+++ b/gateway-test-ldap/src/main/java/org/apache/hadoop/gateway/security/EmbeddedApacheDirectoryServer.java
@@ -17,7 +17,6 @@
  */
 package org.apache.hadoop.gateway.security;
 
-import com.google.common.io.Files;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -30,8 +29,10 @@ import org.apache.directory.shared.ldap.name.LdapDN;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.UUID;
 
 public class EmbeddedApacheDirectoryServer {
 
@@ -98,7 +99,7 @@ public class EmbeddedApacheDirectoryServer {
     directory.setShutdownHookEnabled( true );
     directory.getChangeLog().setEnabled( false );
     directory.setDenormalizeOpAttrsEnabled( true );
-    directory.setWorkingDirectory( initWorkDir( workDir ) );
+    directory.setWorkingDirectory( initWorkDir( null ) );
     return directory;
   }
 
@@ -113,14 +114,19 @@ public class EmbeddedApacheDirectoryServer {
     return transport;
   }
 
-  private static File initWorkDir( File workDir ) {
+  private static File initWorkDir( File workDir ) throws IOException {
     File dir = workDir;
-    if( dir == null ) {
-      dir = new File( System.getProperty( "user.dir" ), EmbeddedApacheDirectoryServer.class.getName()
);
-    }
-    if( dir.exists() ) {
-      dir = Files.createTempDir();
-    }
+//    if( dir == null ) {
+//      dir = new File( System.getProperty( "user.dir" ), EmbeddedApacheDirectoryServer.class.getName()
);
+//    }
+//    if( dir.exists() ) {
+      File file = File.createTempFile( "ApacheDS", "." + UUID.randomUUID() );
+      file.delete();
+      if( !file.mkdirs() ) {
+        throw new IOException( "Failed to create temp dir " + file );
+      }
+      dir = file;
+//    }
     return dir;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75960e1e/gateway-test/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test/pom.xml b/gateway-test/pom.xml
index 56960b0..346b135 100644
--- a/gateway-test/pom.xml
+++ b/gateway-test/pom.xml
@@ -137,11 +137,13 @@
             <scope>test</scope>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
             <scope>test</scope>
         </dependency>
+        -->
 
         <dependency>
             <groupId>com.mycila.xmltool</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75960e1e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b618c1a..1ec0b10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -438,6 +438,14 @@
                         <groupId>junit</groupId>
                         <artifactId>junit</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>tomcat</groupId>
+                        <artifactId>jasper-compiler</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>tomcat</groupId>
+                        <artifactId>jasper-runtime</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
 
@@ -541,11 +549,13 @@
                 <version>1.5.5</version>
             </dependency>
 
+            <!--
             <dependency>
                 <groupId>com.google.guava</groupId>
                 <artifactId>guava</artifactId>
                 <version>14.0-rc1</version>
             </dependency>
+            -->
 
             <dependency>
                 <groupId>org.apache.shiro</groupId>


Mime
View raw message