directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r231085 - in /directory/apacheds/trunk: core/ core/src/main/java/org/apache/ldap/server/jndi/ main/ main/src/main/java/org/apache/ldap/server/jndi/ plugin/ shared/
Date Tue, 09 Aug 2005 19:27:07 GMT
Author: akarasulu
Date: Tue Aug  9 12:26:58 2005
New Revision: 231085

URL: http://svn.apache.org/viewcvs?rev=231085&view=rev
Log:
changes ...

 o ignoring output from running the server in the main
 o added ant tasks on test pregoal to create logs/apacheds.log
 o some formatting
 o removed commons-logging deps minus one needed for spring
 o bumped up deps on ASN.1 project jars to 0.3.2-SNAPSHOT to not have commons
   logging deps in our code
 o bumped up deps on shared/ldap project jars to 0.9.2-SNAPSHOT
 o removed a slew of deps in core for ASN.1 project jars: the core does not 
   have dependencies on the line protocol or anything associated with it.  There
   still are a few deps that need to be removed and I'll do that later.
 o fixed code that incorrectly used Attributes.put() after my changes to
   ldap common for the following JIRA issue:

      http://issues.apache.org/jira/browse/DIREVE-177

   all core and main test cases failed after I bumped the rev of the ldap-common
   jar to the one with changes to the Attributes.put() for correct semantic 
   operation.  I made the needed changes to make the tests pass but I suspect
   there will be more code out there that does not use Attributes.put() 
   correctly.  I suspect this is what is behind these issues with modify ops 
   causing other attribute values to disappear.

Modified:
    directory/apacheds/trunk/core/project.xml
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/JavaLdapSupport.java
    directory/apacheds/trunk/main/   (props changed)
    directory/apacheds/trunk/main/maven.xml
    directory/apacheds/trunk/main/project.xml
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
    directory/apacheds/trunk/plugin/project.xml
    directory/apacheds/trunk/shared/project.xml

Modified: directory/apacheds/trunk/core/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/project.xml?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/core/project.xml (original)
+++ directory/apacheds/trunk/core/project.xml Tue Aug  9 12:26:58 2005
@@ -47,12 +47,6 @@
       </properties>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>1.0.4</version>
-      <url>http://jakarta.apache.org/commons/logging</url>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <version>1.0</version>
@@ -73,40 +67,15 @@
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>ldap-common</artifactId>
-      <version>0.9.1</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>${pom.groupId}</groupId>
       <artifactId>apacheds-shared</artifactId>
       <version>${pom.currentVersion}</version>
     </dependency>
-    <dependency>
-      <groupId>directory-protocols</groupId>
-      <artifactId>ldap-protocol</artifactId>
-      <version>0.9.2-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>directory-asn1</groupId>
-      <artifactId>asn1-codec</artifactId>
-      <version>0.3.1</version>
-    </dependency>
-    <dependency>
-      <groupId>directory-shared</groupId>
-      <artifactId>apache-ldapber-provider</artifactId>
-      <version>0.9.1</version>
-    </dependency>
-    <dependency>
-      <groupId>directory-asn1</groupId>
-      <artifactId>asn1-ber</artifactId>
-      <version>0.3.1</version>
-    </dependency>
-    <dependency>
-      <groupId>directory-network</groupId>
-      <artifactId>mina</artifactId>
-      <version>0.7.3</version>
-    </dependency>
 
-    <!-- The Eve Maven Plugin -->
+    <!-- The Directory Maven Plugin -->
     <dependency>
       <groupId>${pom.groupId}</groupId>
       <artifactId>maven-directory-plugin</artifactId>
@@ -123,8 +92,6 @@
     <report>maven-tasklist-plugin</report>
     <report>maven-junit-report-plugin</report>
     <report>maven-jdepend-plugin</report>
-    <!-- <report>maven-jcoverage-plugin</report> breaks build -->
-    <!-- <report>maven-checkstyle-plugin</report> -->
     <report>maven-simian-plugin</report>
     <report>maven-javadoc-plugin</report>
     <report>maven-jxr-plugin</report>

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
Tue Aug  9 12:26:58 2005
@@ -31,6 +31,7 @@
 import org.apache.ldap.common.exception.LdapNoPermissionException;
 import org.apache.ldap.common.message.LockableAttributesImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
+import org.apache.ldap.common.message.LockableAttributeImpl;
 import org.apache.ldap.common.name.DnParser;
 import org.apache.ldap.common.name.LdapName;
 import org.apache.ldap.common.name.NameComponentNormalizer;
@@ -387,10 +388,13 @@
             firstStart = true;
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "person" );
-            attributes.put( "objectClass", "organizationalPerson" );
-            attributes.put( "objectClass", "inetOrgPerson" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "person" );
+            objectClass.add( "organizationalPerson" );
+            objectClass.add( "inetOrgPerson" );
+            attributes.put( objectClass );
+
             attributes.put( "uid", ContextPartitionNexus.ADMIN_UID );
             attributes.put( "userPassword", environment.get( Context.SECURITY_CREDENTIALS
) );
             attributes.put( "displayName", "Directory Superuser" );
@@ -411,8 +415,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "users" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -430,8 +437,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "groups" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -449,8 +459,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "configuration" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -468,8 +481,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "partitions" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -488,8 +504,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "services" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -508,8 +527,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "organizationalUnit" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "ou", "interceptors" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -528,8 +550,11 @@
             checkPermissionToCreateBootstrapEntries();
 
             Attributes attributes = new LockableAttributesImpl();
-            attributes.put( "objectClass", "top" );
-            attributes.put( "objectClass", "prefNode" );
+            Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+            objectClass.add( "top" );
+            objectClass.add( "organizationalUnit" );
+            attributes.put( objectClass );
+
             attributes.put( "objectClass", "extensibleObject" );
             attributes.put( "prefNodeName", "sysPrefRoot" );
             attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/JavaLdapSupport.java?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/JavaLdapSupport.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/JavaLdapSupport.java
Tue Aug  9 12:26:58 2005
@@ -17,6 +17,8 @@
 package org.apache.ldap.server.jndi;
 
 
+import org.apache.ldap.common.message.LockableAttributeImpl;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -25,6 +27,7 @@
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.Attribute;
 
 
 /**
@@ -163,25 +166,26 @@
          * objectClass: javaContainer
          * objectClass: javaSerializedObject
          */
-        entry.put( OBJECTCLASS_ATTR, TOP_ATTR );
-
-        entry.put( OBJECTCLASS_ATTR, JOBJECT_ATTR );
-
-        entry.put( OBJECTCLASS_ATTR, JCONTAINER_ATTR );
-
-        entry.put( OBJECTCLASS_ATTR, JSERIALIZEDOBJ_ATTR );
+        Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+        objectClass.add( TOP_ATTR );
+        objectClass.add( JOBJECT_ATTR );
+        objectClass.add( JCONTAINER_ATTR );
+        objectClass.add( JSERIALIZEDOBJ_ATTR );
+        entry.put( objectClass );
 
         // Add the javaClassName and javaSerializedData attributes
         entry.put( JCLASSNAME_ATTR, obj.getClass().getName() );
-
         entry.put( JSERIALDATA_ATTR, serialize( obj ) );
 
         // Add all the class names this object can be cast to:
         Class [] classes = obj.getClass().getClasses();
+        Attribute javaClassNames = new LockableAttributeImpl( JCLASSNAMES_ATTR );
 
         for ( int ii = 0; ii < classes.length; ii++ )
         {
-            entry.put( JCLASSNAMES_ATTR, classes[ii].getName() );
+            javaClassNames.add( classes[ii].getName() );
         }
+
+        entry.put( javaClassNames );
     }
 }

Propchange: directory/apacheds/trunk/main/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug  9 12:26:58 2005
@@ -1,4 +1,6 @@
 server-work
+apache.org
+logs
 *.project
 *.classpath
 *.ser

Modified: directory/apacheds/trunk/main/maven.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/maven.xml?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/main/maven.xml (original)
+++ directory/apacheds/trunk/main/maven.xml Tue Aug  9 12:26:58 2005
@@ -3,6 +3,11 @@
 <project default="javaapp"
   xmlns:ant="jelly:ant" xmlns:j="jelly:core">
 
+  <preGoal name="test:test">
+    <ant:mkdir dir="logs"/>
+    <ant:touch file="logs/apacheds.log"/>
+  </preGoal>
+
   <preGoal name="javaapp">
     <attainGoal name="java:compile"/>
   </preGoal>
@@ -13,6 +18,8 @@
 
   <goal name="clean">
     <ant:delete dir="eve"/>
+    <ant:delete dir="logs"/>
+    <ant:delete dir="server-work"/>
     <ant:delete>
       <fileset dir="." includes="*.db"/>
       <fileset dir="." includes="*.lg"/>

Modified: directory/apacheds/trunk/main/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/project.xml?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/main/project.xml (original)
+++ directory/apacheds/trunk/main/project.xml Tue Aug  9 12:26:58 2005
@@ -12,13 +12,13 @@
   </description>
 
   <build>
-      <sourceDirectory>src/main/java</sourceDirectory>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <includes>log4j.properties</includes>
-            </resource>
-        </resources>
+    <sourceDirectory>src/main/java</sourceDirectory>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>log4j.properties</includes>
+      </resource>
+    </resources>
   </build>
 
   <!-- Need to have all dependencies here so appjar bundles them -->
@@ -49,12 +49,6 @@
       <url>http://jakarta.apache.org/commons/lang/api</url>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>1.0.4</version>
-      <url>http://jakarta.apache.org/commons/logging</url>
-    </dependency>
-    <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
       <version>3.0</version>
@@ -87,7 +81,7 @@
       <dependency>
         <groupId>directory-shared</groupId>
         <artifactId>ldap-common</artifactId>
-        <version>0.9.1</version>
+        <version>0.9.2-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>directory-shared</groupId>
@@ -112,17 +106,22 @@
     <dependency>
       <groupId>directory-asn1</groupId>
       <artifactId>asn1-codec</artifactId>
-      <version>0.3.1</version>
+      <version>0.3.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>apache-ldapber-provider</artifactId>
-      <version>0.9.1</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory-asn1</groupId>
       <artifactId>asn1-ber</artifactId>
-      <version>0.3.1</version>
+      <version>0.3.2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>directory-asn1</groupId>
+      <artifactId>asn1-der</artifactId>
+      <version>0.3.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory-network</groupId>
@@ -151,6 +150,14 @@
       <artifactId>spring-beans</artifactId>
       <version>1.2.1</version>
       <url>http://www.springframework.com/</url>
+    </dependency>
+
+    <!-- Still needed for Spring -->
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
+      <url>http://jakarta.apache.org/commons/logging</url>
     </dependency>
     <dependency>
       <groupId>springframework</groupId>

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
Tue Aug  9 12:26:58 2005
@@ -44,8 +44,9 @@
 import org.apache.mina.common.TransportType;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -58,7 +59,7 @@
  */
 public class ServerContextFactory extends CoreContextFactory
 {
-    private static Log log = LogFactory.getLog( ServerContextFactory.class.getName() );
+    private static Logger log = LoggerFactory.getLogger( ServerContextFactory.class.getName()
);
     private static Service ldapService;
     private static Service kerberosService;
     private static ServiceRegistry minaRegistry;

Modified: directory/apacheds/trunk/plugin/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/plugin/project.xml?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/plugin/project.xml (original)
+++ directory/apacheds/trunk/plugin/project.xml Tue Aug  9 12:26:58 2005
@@ -46,12 +46,12 @@
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>ldap-common</artifactId>
-      <version>0.9.1</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory</groupId>
       <artifactId>apacheds-shared</artifactId>
-      <version>0.9</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>velocity</groupId>
@@ -129,8 +129,6 @@
     <report>maven-tasklist-plugin</report>
     <report>maven-junit-report-plugin</report>
     <report>maven-jdepend-plugin</report>
-    <!-- <report>maven-jcoverage-plugin</report> breaks multiproject -->
-    <!-- <report>maven-checkstyle-plugin</report> -->
     <report>maven-simian-plugin</report>
     <report>maven-javadoc-plugin</report>
     <report>maven-jxr-plugin</report>

Modified: directory/apacheds/trunk/shared/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/shared/project.xml?rev=231085&r1=231084&r2=231085&view=diff
==============================================================================
--- directory/apacheds/trunk/shared/project.xml (original)
+++ directory/apacheds/trunk/shared/project.xml Tue Aug  9 12:26:58 2005
@@ -16,7 +16,7 @@
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>ldap-common</artifactId>
-      <version>0.9.1</version>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
   </dependencies>
 
@@ -25,11 +25,6 @@
     <report>maven-tasklist-plugin</report>
     <report>maven-junit-report-plugin</report>
     <report>maven-jdepend-plugin</report>
-    <!--
-       Causes 404 because without test cases there is no coverage report.
-       <report>maven-jcoverage-plugin</report>
-    -->
-    <!-- <report>maven-checkstyle-plugin</report> -->
     <report>maven-simian-plugin</report>
     <report>maven-javadoc-plugin</report>
     <report>maven-jxr-plugin</report>



Mime
View raw message