Emmanuel Lecharny schrieb:
Alex Karasulu a écrit :
Jörg Henne wrote:
Hi all,

so far, I've only worked with the release candidates (directory/releases/apacheds/1.0-RCx). But there is, of course, also the trunk and the 1.0 branch. The difference between the 1.0 branch and the trunk seems to be rather significant. What, roughly, are the important differences between those two, and which one is the recommended starting point?
The 1.1 branch is the trunk.  1.0 is the stable branch we're trying to clean up and get out the door.

1.1 has a bunch of new features like OSGi and Triggers/Stored Procs.

HTH,
Alex

I will add that we are currently working in a branch ( 1.0 optimization-trunk) which will be merged soon in the 1.0 branch and the trunks.

Emmanuel.
Ok, thanks for the overview. Since I am focused on getting something production-ish ready, I'll stick with 1.0-trunks for now.
I've had some problems getting org.apache.directory.shared.ldap.ldif.LdifReaderTest.java to succeed:
- the generated test files use the absolute path "/tmp/" as a prefix. This is fine on *nix, but fails on Windows, of course.
- the file:// URLs have the same Problem, of course.
- the UTF-8 used in the file doesn't seem to be recognized out of the box. This causes problems with three tests. I don't know whether this is a problem with maven, my setup, or Windows. Anyway: I converted two of them to use \uxxxx escapes, however there is still testLdifParserRFC2849Sample4() which I don't readily see how to convert, since eclipse doesn't display some characters (and I do have CJK fonts installed!). Maybe I'll start another try with vi tomorrow.

Joerg Henne

Here's a patch for the file, although I fear that applying it might fail due to character set problems...

Index: C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
===================================================================
--- C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java    (revision 426825)
+++ C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java    (working copy)
@@ -8,6 +8,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.net.URL;
 import java.util.List;
 
 import junit.framework.TestCase;
@@ -27,10 +28,12 @@
 public class LdifReaderTest extends TestCase
 {
     private byte[] data;
+    private URL jensenURL;
+    private URL fionaURL;
 
     private File createFile( String name, byte[] data ) throws IOException
     {
-        File jpeg = new File( "/tmp/" + name );
+        File jpeg = File.createTempFile(name, null);
 
         jpeg.createNewFile();
 
@@ -60,8 +63,8 @@
             data[i] = (byte) i;
         }
 
-        createFile( "hjensen.jpg", data );
-        createFile( "fiona.jpg", data );
+        jensenURL = createFile( "hjensen.jpg", data ).toURL();
+        fionaURL = createFile( "fiona.jpg", data ).toURL();
     }
 
     public void testLdifNull() throws NamingException
@@ -467,7 +470,7 @@
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn() );
 
         Attribute attr = entry.get( "cn" );
-        assertTrue( attr.contains( "Emmanuel LĂ©charny".getBytes( "UTF-8" ) ) );
+        assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -510,7 +513,7 @@
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn() );
 
         Attribute attr = entry.get( "cn" );
-        assertTrue( attr.contains( "Emmanuel LĂ©charny  ".getBytes( "UTF-8" ) ) );
+        assertTrue( attr.contains( "Emmanuel L\u00e9charny  ".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
@@ -911,7 +915,7 @@
             "sn: Jensen\n" +
             "uid: hjensen\n" +
             "telephonenumber: +1 408 555 1212\n" +
-            "jpegphoto:< file:///tmp/hjensen.jpg";
+            "jpegphoto:< " + jensenURL.toExternalForm();
 
         LdifReader reader = new LdifReader();
         List entries = reader.parseLdif( ldif );
@@ -1007,7 +1011,7 @@
             "sn: Jensen\n" +
             "uid: fiona\n" +
             "telephonenumber: +1 408 555 1212\n" +
-            "jpegphoto:< file:///tmp/fiona.jpg\n" +
+            "jpegphoto:< " + fionaURL + "\n" +
             "\n" +
             // Second entry modification : DELETE
             "# Delete an existing entry\n" +