[jboss-svn-commits] JBoss Portal SVN: r5554 - in trunk: build build/ide/intellij/idea50/modules/identity build/ide/intellij/idea50/modules/test build/ide/intellij/idea50/modules/thirdparty identity identity/src/main/org/jboss/portal/identity2/ldap identity/src/main/org/jboss/portal/test/identity test test/src/etc test/src/etc/ldap/ldif test/src/etc/opends/config test/src/main/org/jboss/portal/test/framework/embedded/apacheds test/src/main/org/jboss/portal/test/framework/embedded/opends test/src/resources/portal-test-sar/META-INF testsuite tools/etc/buildfragments

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Nov 1 17:15:43 EST 2006


Author: bdaw
Date: 2006-11-01 17:15:12 -0500 (Wed, 01 Nov 2006)
New Revision: 5554

Modified:
   trunk/build/build-thirdparty.xml
   trunk/build/ide/intellij/idea50/modules/identity/identity.iml
   trunk/build/ide/intellij/idea50/modules/test/test.iml
   trunk/build/ide/intellij/idea50/modules/thirdparty/thirdparty.iml
   trunk/identity/build.xml
   trunk/identity/src/main/org/jboss/portal/identity2/ldap/LDAPConnectionContext.java
   trunk/identity/src/main/org/jboss/portal/test/identity/LDAPStaticGroupMembershipModuleTestCase.java
   trunk/identity/src/main/org/jboss/portal/test/identity/LDAPTestCase.java
   trunk/identity/src/main/org/jboss/portal/test/identity/LDAPUserTestCase.java
   trunk/test/build.xml
   trunk/test/src/etc/directories.xml
   trunk/test/src/etc/ldap/ldif/example1.ldif
   trunk/test/src/etc/opends/config/config.ldif
   trunk/test/src/main/org/jboss/portal/test/framework/embedded/apacheds/ApacheDSService.java
   trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java
   trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSServiceMBean.java
   trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSUtil.java
   trunk/test/src/resources/portal-test-sar/META-INF/jboss-service.xml
   trunk/testsuite/build.xml
   trunk/tools/etc/buildfragments/buildmagic.ent
Log:
- get rid of ApacheDS
- reintroduce OpenDS and make portal code compile with jdk1.4 anyway (by jdk recognition in ant)
- put OpenDS running as mbean on AS during tests instead of run/stop per test
- and didn't break testsuite hopefully....

Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/build/build-thirdparty.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -55,7 +55,7 @@
       <componentref name="apache-myfaces" version="1.1.1"/>      
       <componentref name="apache-codec" version="1.3.0"/>
       <componentref name="apache-collections" version="3.1"/>
-      <componentref name="apache-directory" version="mixed"/>
+      <!--<componentref name="apache-directory" version="mixed"/>-->
       <componentref name="apache-fileupload" version="1.1.1"/>
       <componentref name="apache-httpclient" version="3.0.1"/>
       <componentref name="apache-lang" version="2.0"/>
@@ -106,7 +106,8 @@
       <componentref name="slf4j" version="1.0.2"/>
       <componentref name="sun-jaf" version="1.0.2"/>
       <componentref name="sun-javacc" version="3.2-portal"/>      
-      <componentref name="sun-javamail" version="1.3.1"/> 
+      <componentref name="sun-javamail" version="1.3.1"/>
+      <componentref name="sun-opends" version="snapshot"/>
       <componentref name="sun-servlet" version="2.4"/>
       <componentref name="xdoclet" version="1.2.3"/>
      

Modified: trunk/build/ide/intellij/idea50/modules/identity/identity.iml
===================================================================
--- trunk/build/ide/intellij/idea50/modules/identity/identity.iml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/build/ide/intellij/idea50/modules/identity/identity.iml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -88,156 +88,12 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-core-1.0-RC4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opends/lib/OpenDS.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-core-shared-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-kerberos-shared-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-kerberos-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/jdbm-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-tools-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-filter-codec-asn1-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-ldap-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-filter-ssl-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/shared-ldap-0.9.5.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-jndi-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-changepw-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/nlog4j-1.2.25.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-core-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-main-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/shared-asn1-0.9.5.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-shared-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
     <orderEntryProperties />
   </component>
   <component name="VcsManagerConfiguration">

Modified: trunk/build/ide/intellij/idea50/modules/test/test.iml
===================================================================
--- trunk/build/ide/intellij/idea50/modules/test/test.iml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/build/ide/intellij/idea50/modules/test/test.iml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -284,7 +284,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-core-1.0-RC4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/servlet-api.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -293,156 +293,12 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-core-shared-1.0-RC4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opends/lib/OpenDS.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-kerberos-shared-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-kerberos-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/jdbm-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-tools-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-filter-codec-asn1-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-ldap-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-filter-ssl-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/shared-ldap-0.9.5.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-jndi-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-changepw-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/nlog4j-1.2.25.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/mina-core-0.9.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-server-main-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/shared-asn1-0.9.5.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-directory/lib/apacheds-protocol-shared-1.0-RC4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/servlet-api.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
     <orderEntryProperties />
   </component>
   <component name="VcsManagerConfiguration">

Modified: trunk/build/ide/intellij/idea50/modules/thirdparty/thirdparty.iml
===================================================================
--- trunk/build/ide/intellij/idea50/modules/thirdparty/thirdparty.iml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/build/ide/intellij/idea50/modules/thirdparty/thirdparty.iml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -4,7 +4,9 @@
   <component name="NewModuleRootManager" inherit-compiler-output="false">
     <output url="file://$MODULE_DIR$/../../../../../../thirdparty/classes" />
     <exclude-output />
-    <content url="file://$MODULE_DIR$" />
+    <content url="file://$MODULE_DIR$/../../../../../../thirdparty">
+      <sourceFolder url="file://$MODULE_DIR$/../../../../../../thirdparty" isTestSource="false" />
+    </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntryProperties />

Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/identity/build.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -97,7 +97,7 @@
          <path refid="hibernate.hibernate.classpath"/>
          <path refid="apache.log4j.classpath"/>
          <path refid="junit.junit.classpath"/>
-         <path refid="apache.directory.classpath"/>
+         <!--<path refid="sun.opends.classpath"/>-->
       </path>
 
       <path id="javac.classpath">
@@ -139,12 +139,87 @@
    <target name="compile"
            description="Compile all source files."
            depends="generate-parsers,
-               _default:compile-classes,
+               compile-classes,
+               compile-classes15,
                _default:compile-etc,
                _default:compile-resources">
       <!-- Add module specific elements here. -->
    </target>
 
+
+   <target name="compile-classes" depends="_buildmagic:init" unless="HAVE_JDK_1.5">
+      <mkdir dir="${build.classes}"/>
+
+      <!-- Hack, required to avoid duplicate javac targets -->
+      <mkdir dir="${build.gen.classes}"/>
+
+      <!-- Remove classes which depend on changed files, so they will rebuild. -->
+      <depend srcdir="${source.java}:${build.gen.classes}"
+              destdir="${build.classes}"
+              dump="${javac.depend.dump}"
+              closure="${javac.depend.closure}">
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </depend>
+
+      <javac destdir="${build.classes}"
+             optimize="${javac.optimize}"
+             target="${javac.target}"
+             debug="${javac.debug}"
+             source="${javac.source}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}:${build.gen.classes}"/>
+         <classpath refid="javac.classpath"/>
+
+
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+         <exclude name="org/jboss/portal/test/identity/**"/>
+      </javac>
+   </target>
+
+
+   <target name="compile-classes15" depends="_buildmagic:init" if="HAVE_JDK_1.5">
+      <mkdir dir="${build.classes}"/>
+
+      <!-- Hack, required to avoid duplicate javac targets -->
+      <mkdir dir="${build.gen.classes}"/>
+
+      <!-- Remove classes which depend on changed files, so they will rebuild. -->
+      <depend srcdir="${source.java}:${build.gen.classes}"
+              destdir="${build.classes}"
+              dump="${javac.depend.dump}"
+              closure="${javac.depend.closure}">
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </depend>
+
+      <javac destdir="${build.classes}"
+             optimize="${javac.optimize}"
+             target="${javac.target}"
+             debug="${javac.debug}"
+             source="${javac.source}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}:${build.gen.classes}"/>
+         <classpath refid="javac.classpath"/>
+         <classpath refid="sun.opends.classpath"/>
+
+
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </javac>
+   </target>
+
    <target name="generate-parsers" depends="init">
    </target>
 
@@ -218,6 +293,10 @@
 
    <target name="tests" depends="init">
 
+      <fail unless="HAVE_JDK_1.5">
+           Unsupported Java version: You need at least JDK1.5 to run tests in identity module
+      </fail>
+
       <property name="proto-libs" value="${project.root}/proto-libs"/>
 
 
@@ -231,7 +310,15 @@
 -->
 
          <x-test>
-            <test todir="${test.reports}" name="org.jboss.portal.test.identity.DBUserTestCase"/>
+            <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.DBUserTestCase"/>-->
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPSimpleUserModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPSimpleRoleModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
+            <!--<test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
+            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>-->
          </x-test>
          <x-classpath>
             <pathelement location="${build.lib}/portal-identity-lib.jar"/>
@@ -241,7 +328,7 @@
 
 
             <path refid="apache.commons.classpath"/>
-
+            <path refid="sun.opends.classpath"/>
             <path refid="dom4j.dom4j.classpath"/>
             <path refid="jboss.microcontainer.classpath"/>
             <path refid="jboss.jbossxb.classpath"/>
@@ -265,48 +352,6 @@
          </x-classpath>
       </execute-tests>
 
-      <!-- tests that uses apacheds are separate because nlog4j clashes with log4j-->
-      <!--<execute-tests>
-         <x-test>
-
-
-            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPStaticGroupMembershipModuleTestCase"/>
-            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPSimpleUserModuleTestCase"/>
-            <test todir="${test.reports}"  name="org.jboss.portal.test.identity.LDAPSimpleRoleModuleTestCase"/>
-         </x-test>
-         <x-classpath>
-            <pathelement location="${build.lib}/portal-identity-lib.jar"/>
-            <pathelement location="${build.lib}/portal-identity-test-lib.jar"/>
-            <pathelement location="${jboss.portal-test.root}/etc"/>
-            <pathelement location="${build.resources}/hibernate"/>
-
-
-            <path refid="apache.directory.classpath"/>
-            <path refid="apache.commons.classpath"/>
-
-            <path refid="dom4j.dom4j.classpath"/>
-            <path refid="jboss.microcontainer.classpath"/>
-            <path refid="jboss.jbossxb.classpath"/>
-            <path refid="apache.xerces.classpath"/>
-            <path refid="oswego.concurrent.classpath"/>
-            <path refid="apache.logging.classpath"/>
-            <path refid="apache.log4j.classpath"/>
-            <path refid="hibernate.hibernate.classpath"/>
-            <path refid="antlr.antlr.classpath"/>
-            <path refid="asm.asm.classpath"/>
-            <path refid="hsqldb.hsqldb.classpath"/>
-            <path refid="apache.collections.classpath"/>
-            <path refid="jbossas/core.libs.classpath"/>
-            <path refid="junit.junit.classpath"/>
-            <path refid="apache.logging.classpath"/>
-            <path refid="cglib.cglib.classpath"/>
-            <path refid="jboss.portal-test.classpath"/>
-            <path refid="jboss.portal-common.classpath"/>
-            <path refid="jboss.portal-jems.classpath"/>
-            --><!--<path refid="sleepycat.sleepycat.classpath"/>--><!--
-            <path refid="sun.jaf.classpath"/>
-         </x-classpath>
-      </execute-tests>-->
    </target>
 
 </project>

Modified: trunk/identity/src/main/org/jboss/portal/identity2/ldap/LDAPConnectionContext.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity2/ldap/LDAPConnectionContext.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/identity/src/main/org/jboss/portal/identity2/ldap/LDAPConnectionContext.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -123,12 +123,12 @@
    public String toString()
    {
       StringBuffer str = new StringBuffer();
-      str.append("Name: " + this.name)
-         .append(", Provider URL: " + this.providerUrl)
-         .append(", Context factory: " + this.contextFactory)
-         .append(", Admin user: " + this.adminDN)
-         .append(", Admin password: " + this.adminPassword)
-         .append(", Authentication: " + this.authentication);
+      str.append("Name: ").append(this.name)
+         .append(", Provider URL: ").append(this.providerUrl)
+         .append(", Context factory: ").append(this.contextFactory)
+         .append(", Admin user: ").append(this.adminDN)
+         .append(", Admin password: ").append(this.adminPassword)
+         .append(", Authentication: ").append(this.authentication);
       return str.toString();
    }
 

Modified: trunk/identity/src/main/org/jboss/portal/test/identity/LDAPStaticGroupMembershipModuleTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/LDAPStaticGroupMembershipModuleTestCase.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/LDAPStaticGroupMembershipModuleTestCase.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -119,5 +119,4 @@
       }
 
    }
-   
 }

Modified: trunk/identity/src/main/org/jboss/portal/test/identity/LDAPTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/LDAPTestCase.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/LDAPTestCase.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -22,7 +22,7 @@
  ******************************************************************************/
 package org.jboss.portal.test.identity;
 
-import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
+//import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.apache.log4j.Appender;
 import org.apache.log4j.ConsoleAppender;
 import org.apache.log4j.Level;
@@ -31,9 +31,11 @@
 import org.jboss.portal.identity2.ldap.LDAPConnectionContext;
 import org.jboss.portal.test.framework.TestRuntimeContext;
 import org.jboss.portal.test.framework.embedded.DSConfig;
+import org.jboss.portal.test.framework.embedded.opends.OpenDSService;
 import org.jboss.portal.common.test.junit.JUnitAdapter;
 import org.jboss.portal.common.test.junit.POJOJUnitTest;
-import org.jboss.portal.test.framework.embedded.apacheds.ApacheDSService;
+import org.opends.server.tools.LDAPModify;
+//import org.jboss.portal.test.framework.embedded.apacheds.ApacheDSService;
 
 import javax.naming.Binding;
 import javax.naming.Context;
@@ -41,9 +43,11 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import java.net.URL;
+import java.net.Socket;
 import java.util.Hashtable;
 import java.util.Map;
 import java.util.HashMap;
+import java.io.File;
 
 import junit.framework.TestSuite;
 
@@ -91,7 +95,7 @@
 
    private DSConfig directoryServerConfigParameter;
 
-   protected ApacheDSService embeddedDSService;
+   protected OpenDSService embeddedDSService;
 
    public String getName()
    {
@@ -110,13 +114,14 @@
 
    public void setUp() throws Exception
    {
-      System.out.println("#######################%%%%%%%%%%%%%%%%%%");
-      if(directoryServerConfigParameter.isUseEmbedded())
+      /*if(directoryServerConfigParameter.isUseEmbedded())
       {
-         embeddedDSService = new ApacheDSService();
-         embeddedDSService.setRemoveWorkingDir(true);
+         embeddedDSService = new OpenDSService();
+         //embeddedDSService.setRemoveWorkingDir(true);
          embeddedDSService.start();
-      }
+         //give a chance to come up...
+         //Thread.sleep(500);
+      }*/
       runtimeContext.start();
 
 
@@ -131,12 +136,10 @@
 
       runtimeContext.stop();
 
-      if (embeddedDSService != null && directoryServerConfigParameter.isUseEmbedded())
+      /*if (embeddedDSService != null && directoryServerConfigParameter.isUseEmbedded())
       {
          embeddedDSService.stop();
-         //give ApacheDS time to free the port...
-         Thread.sleep(200);
-      }
+      }*/
    }
 
 
@@ -157,6 +160,7 @@
       try
       {
          //on start load the content into ldap
+         log.info("Populate directory...");
 
          DirContext ctx = getDirContext();
          ClassLoader tcl = Thread.currentThread().getContextClassLoader();
@@ -165,8 +169,25 @@
          URL ldif = tcl.getResource(directoryServerConfigParameter.getPopulateLdif());
          log.info("ldif to load by loader: " + ldif.getPath());
 
-         LdifFileLoader loader = new LdifFileLoader(ctx, ldif.getPath());
-         loader.execute();
+         /* LdifFileLoader loader = new LdifFileLoader(ctx, ldif.getPath());
+         loader.execute();*/
+
+         //String fileurl = this.getResourceURL("security/opends/ldif/example1.ldif");
+         //URL url = this.getDeployURL(fileurl);
+         log.debug("ldap add ldif url="+ldif);
+         File file = new File(ldif.getPath());
+         String[] cmd = new String[] {"-h", "localhost", "-p",
+            "10389", "-D", "cn=Directory Manager",
+            "-w", "password",
+            "-a", "-f",file.getPath()};
+         /*String[] cmd = new String[] {"-h", directoryServerConfigParameter.getProviderUrl().split(":")[1],
+            "-p", directoryServerConfigParameter.getProviderUrl().split(":")[2],
+            "-D", directoryServerConfigParameter.getAdminDN(),
+            "-w", directoryServerConfigParameter.getAdminPassword(),
+            "-a", "-f",file.getPath()};*/
+
+         //System.out.println("Populate success: :" + (LDAPModify.mainModify(cmd,false,System.out, System.err) == 0));
+         System.out.println("Populate success: :" + (LDAPModify.mainModify(cmd) == 0));
       }
       catch (Exception e)
       {
@@ -178,17 +199,32 @@
    {
       try
       {
+         log.info("Cleanup directory...");
          DirContext ctx = getDirContext();
          String fullDN = directoryServerConfigParameter.getCleanUpDN();
          String[] parts = fullDN.split(",");
          String removeContext = parts[0];
 
+         //for embedded OpenDS it must be removed that way
+         if (directoryServerConfigParameter.isUseEmbedded())
+         {
+            removeContext = fullDN;
+         }
+
          String suffix = fullDN.substring(fullDN.indexOf(",")+1,fullDN.length());
 
          log.debug("Clean up: \'" + removeContext + "\' from \'" + suffix + "\'");
 
          //DirContext org = (DirContext)ctx.lookup("dc=org");
-         DirContext org = (DirContext)ctx.lookup(suffix);
+
+         //of we use embedded the "dc=org" is already a suffix - just a small hack for such DIT
+         DirContext org = ctx;
+
+         //if not lets obtain...
+         if (!directoryServerConfigParameter.isUseEmbedded())
+         {
+            org = (DirContext)ctx.lookup(suffix);
+         }
          removeContext(org, removeContext);
       }
       catch (Exception e)
@@ -203,7 +239,7 @@
       Hashtable env = new Hashtable();
       env.put(Context.INITIAL_CONTEXT_FACTORY, directoryServerConfigParameter.getContextFactory());
       env.put(Context.PROVIDER_URL, directoryServerConfigParameter.getProviderUrl());
-      env.put(Context.SECURITY_AUTHENTICATION, "simple");
+      //env.put(Context.SECURITY_AUTHENTICATION, "simple");
       env.put(Context.SECURITY_PRINCIPAL, directoryServerConfigParameter.getAdminDN());
       env.put(Context.SECURITY_CREDENTIALS, directoryServerConfigParameter.getAdminPassword());
       return new InitialDirContext(env);

Modified: trunk/identity/src/main/org/jboss/portal/test/identity/LDAPUserTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/LDAPUserTestCase.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/LDAPUserTestCase.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -23,7 +23,7 @@
 package org.jboss.portal.test.identity;
 
 import junit.framework.TestSuite;
-import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
+//import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.apache.log4j.Appender;
 import org.apache.log4j.ConsoleAppender;
 import org.apache.log4j.Level;
@@ -139,8 +139,8 @@
          URL ldif = tcl.getResource("ldap/ldif/example1.ldif");
          log.info("ldif to load by loader: " + ldif.getPath());
 
-         LdifFileLoader loader = new LdifFileLoader(ctx, ldif.getPath());
-         loader.execute();
+         /*LdifFileLoader loader = new LdifFileLoader(ctx, ldif.getPath());
+         loader.execute();*/
       }
       catch (Exception e)
       {

Modified: trunk/test/build.xml
===================================================================
--- trunk/test/build.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/build.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -97,10 +97,9 @@
          <path refid="apache.logging.classpath"/>
          <path refid="junit.junit.classpath"/>
          <path refid="sun.servlet.classpath"/>
-         <path refid="apache.directory.classpath"/>
+         <!--<path refid="sun.opends.classpath"/>-->
       </path>
 
-
       <!-- Configure modules -->
       <call target="configure-modules"/>
       <path id="dependentmodule.classpath">
@@ -134,12 +133,84 @@
    <target name="compile"
            description="Compile all source files."
            depends="generate-parsers,
-               _default:compile-classes,
+               compile-classes,
+               compile-classes15,
                _default:compile-etc,
                _default:compile-resources">
       <!-- Add module specific elements here. -->
    </target>
 
+   <target name="compile-classes" depends="_buildmagic:init" unless="HAVE_JDK_1.5">
+      <mkdir dir="${build.classes}"/>
+
+      <!-- Hack, required to avoid duplicate javac targets -->
+      <mkdir dir="${build.gen.classes}"/>
+
+      <!-- Remove classes which depend on changed files, so they will rebuild. -->
+      <depend srcdir="${source.java}:${build.gen.classes}"
+              destdir="${build.classes}"
+              dump="${javac.depend.dump}"
+              closure="${javac.depend.closure}">
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </depend>
+
+      <javac destdir="${build.classes}"
+             optimize="${javac.optimize}"
+             target="${javac.target}"
+             debug="${javac.debug}"
+             source="${javac.source}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}:${build.gen.classes}"/>
+         <classpath refid="javac.classpath"/>
+
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+         <exclude name="org/jboss/portal/test/framework/embedded/opends/**"/>
+      </javac>
+   </target>
+
+
+   <target name="compile-classes15" depends="_buildmagic:init" if="HAVE_JDK_1.5">
+      <mkdir dir="${build.classes}"/>
+
+      <!-- Hack, required to avoid duplicate javac targets -->
+      <mkdir dir="${build.gen.classes}"/>
+
+      <!-- Remove classes which depend on changed files, so they will rebuild. -->
+      <depend srcdir="${source.java}:${build.gen.classes}"
+              destdir="${build.classes}"
+              dump="${javac.depend.dump}"
+              closure="${javac.depend.closure}">
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </depend>
+
+      <javac destdir="${build.classes}"
+             optimize="${javac.optimize}"
+             target="${javac.target}"
+             debug="${javac.debug}"
+             source="${javac.source}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}:${build.gen.classes}"/>
+         <classpath refid="javac.classpath"/>
+         <classpath refid="sun.opends.classpath"/>
+
+         <include name="${javac.includes}"/>
+         <exclude name="${javac.excludes}"/>
+      </javac>
+   </target>
+
    <target name="generate-parsers" depends="init">
    </target>
 
@@ -169,6 +240,7 @@
       <jar jarfile="${build.lib}/portal-test-agent-lib.jar" manifest="${build.etc}/portal-test-lib-jar.mf">
          <fileset dir="${build.classes}">
             <include name="org/jboss/portal/test/framework/agent/**"/>
+            <include name="org/jboss/portal/test/framework/embedded/opends/**"/>
          </fileset>
       </jar>
 
@@ -178,8 +250,9 @@
          <fileset dir="${build.resources}/portal-test-sar"/>
          <!--<fileset dir="${junit.junit.lib}" includes="junit.jar"/>-->
          <fileset dir="${build.lib}" includes="portal-test-agent-lib.jar"/>
-         <!--<fileset dir="${sun.opends.lib}" includes="OpenDS.jar"/>-->
-         <!--<fileset dir="${sleepycat.sleepycat.lib}" includes="je.jar"/>-->
+         <fileset dir="${sun.opends.lib}" includes="OpenDS.jar"/>
+         <fileset dir="${build.etc}/opends/" includes="*"/>
+         <fileset dir="${sleepycat.sleepycat.lib}" includes="je.jar"/>
          <!--<fileset dir="${sun.jaf.lib}" includes="activation.jar"/>-->
       </jar>
    </target>
@@ -220,6 +293,10 @@
            description="Deploy."
            depends="output">
       <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+      <mkdir dir="${jboss.home}/server/${portal.deploy.dir}/../conf/opends"/>
+      <copy todir="${jboss.home}/server/${portal.deploy.dir}/../conf/opends" overwrite="true">
+         <fileset dir="${build.etc}/opends"/>
+      </copy>
       <copy file="${build.lib}/portal-test.sar" todir="${jboss.home}/server/${portal.deploy.dir}"/>
    </target>
 
@@ -228,5 +305,6 @@
            depends="init">
       <require file="${jboss.home}/server/${portal.deploy.dir}"/>
       <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-test.sar"/>
+      <delete dir="${jboss.home}/server/${portal.deploy.dir}/../conf/opends"/>
    </target>
 </project>

Modified: trunk/test/src/etc/directories.xml
===================================================================
--- trunk/test/src/etc/directories.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/etc/directories.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -24,11 +24,11 @@
 <directories>
    <directory>
       <name>ApacheDS</name>
-      <description>Embedded ApacheDS service</description>
+      <description>Embedded OpenDS service</description>
       <provider-url>ldap://localhost:10389</provider-url>
       <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
-      <admin-dn>uid=admin,ou=system</admin-dn>
-      <admin-password>secret</admin-password>
+      <admin-dn>cn=Directory Manager</admin-dn>
+      <admin-password>password</admin-password>
       <use-embedded>true</use-embedded>
       <populate-ldif>ldap/ldif/example1.ldif</populate-ldif>
       <cleanup-dn>dc=jboss,dc=org</cleanup-dn>

Modified: trunk/test/src/etc/ldap/ldif/example1.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/example1.ldif	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/etc/ldap/ldif/example1.ldif	2006-11-01 22:15:12 UTC (rev 5554)
@@ -1,6 +1,3 @@
-
-
-
 dn: dc=jboss,dc=org
 objectclass: top
 objectclass: dcObject

Modified: trunk/test/src/etc/opends/config/config.ldif
===================================================================
--- trunk/test/src/etc/opends/config/config.ldif	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/etc/opends/config/config.ldif	2006-11-01 22:15:12 UTC (rev 5554)
@@ -257,7 +257,7 @@
 ds-cfg-ssl-cert-nickname: server-cert
 ds-cfg-allow-tcp-reuse-address: true
 ds-cfg-use-tcp-nodelay: true
-ds-cfg-listen-port: 1389
+ds-cfg-listen-port: 10389
 ds-cfg-connection-handler-enabled: true
 ds-cfg-accept-backlog: 128
 ds-cfg-max-request-size: 5 megabytes

Modified: trunk/test/src/main/org/jboss/portal/test/framework/embedded/apacheds/ApacheDSService.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/embedded/apacheds/ApacheDSService.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/main/org/jboss/portal/test/framework/embedded/apacheds/ApacheDSService.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -23,6 +23,7 @@
 
 package org.jboss.portal.test.framework.embedded.apacheds;
 
+/*
 import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
 import org.apache.directory.server.core.configuration.Configuration;
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
@@ -41,6 +42,7 @@
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Set;
+*/
 
 
 /**
@@ -53,9 +55,9 @@
  * @version $Revision$
  * @since Sep 29, 2006
  */
-public class ApacheDSService extends ServiceMBeanSupport implements ApacheDSServiceMBean
+public class ApacheDSService //extends ServiceMBeanSupport implements ApacheDSServiceMBean
 {
-   public static String objectName = "portal.test:service=ApacheDSService";
+   /*public static String objectName = "portal.test:service=ApacheDSService";
 
    private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(ApacheDSService.class);
 
@@ -70,11 +72,11 @@
    private int port = 10389;
 
 
-   /**
+   *//**
     * Print some information about the DS (eg: connections etc)
     *
     * @return String
-    */
+    *//*
    public String printDiagnostics()
    {
       StringBuffer sb = new StringBuffer();
@@ -308,12 +310,12 @@
    }
 
 
-   /**
+   *//**
     * A GetSystemPropetyAction.
     *
     * @author <a href="anil.saldhana at jboss.com">Anil Saldhana</a>
     * @version $Revision: 1.1 $
-    */
+    *//*
    public class GetSystemPropertyAction implements PrivilegedAction
    {
       private String property;
@@ -327,6 +329,6 @@
       {
          return System.getProperty(property);
       }
-   }
+   }*/
 
 }

Modified: trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -23,9 +23,14 @@
 
 package org.jboss.portal.test.framework.embedded.opends;
 
-//import org.opends.server.core.DirectoryServer;
+import org.opends.server.core.DirectoryServer;
+import org.jboss.system.ServiceMBeanSupport;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.net.URL;
 
+
 /**
  * Class forked from JBoss Application Server testsuite: http://anonsvn.jboss.org/repos/jbossas/trunk/testsuite/src/main/org/jboss/test/security/test/opends/
  * <p/>
@@ -36,18 +41,18 @@
  * @version $Revision$
  * @since Sep 13, 2006
  */
-public class OpenDSService //extends ServiceMBeanSupport implements OpenDSServiceMBean
+public class OpenDSService extends ServiceMBeanSupport implements OpenDSServiceMBean
 {
-   /*public static String objectName = "portal.test:service=OpenDSService";
+   public static String objectName = "portal.test:service=OpenDSService";
 
    private String newline = (String)
-            AccessController.doPrivileged(new GetSystemPropertyAction("line.separator"));*/
+            AccessController.doPrivileged(new GetSystemPropertyAction("line.separator"));
 
    /**
     * Print some information about the DS (eg: connections etc)
     * @return
     */
-   /*public String printDiagnostics()
+   public String printDiagnostics()
    {
      StringBuffer sb = new StringBuffer();
      sb.append("Maximum concurrent client connections allowed:");
@@ -55,12 +60,12 @@
      sb.append(newline).append("# of client connections currently established:");
      sb.append(DirectoryServer.getCurrentConnections());
      return sb.toString();
-   }*/
+   }
 
    /**
     * Restart the Directory Server
     */
-   /*public void restart()
+   public void restart()
    {
      DirectoryServer.restart(getClass().getName(), "DS restart");
    }
@@ -93,7 +98,7 @@
    {
       log.debug("Asking DS to shutdown");
       DirectoryServer.shutDown(getClass().getName(), "Shut down DS");
-   }*/
+   }
 
    /**
     *
@@ -102,7 +107,7 @@
     * @author <a href="anil.saldhana at jboss.com">Anil Saldhana</a>
     * @version $Revision: 1.1 $
     */
-   /*public class GetSystemPropertyAction implements PrivilegedAction
+   public class GetSystemPropertyAction implements PrivilegedAction
    {
       private String property;
 
@@ -115,6 +120,6 @@
       {
          return System.getProperty(property);
       }
-   }*/
+   }
 
 }
\ No newline at end of file

Modified: trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSServiceMBean.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSServiceMBean.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSServiceMBean.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -32,9 +32,9 @@
 public interface OpenDSServiceMBean extends ServiceMBean
 {
 
-   /* public String printDiagnostics();
+   /*public String printDiagnostics();
 
-    public void restart();*/
+   public void restart();
 
    public boolean isRemoveWorkingDir();
 
@@ -50,6 +50,6 @@
 
    public String getImportInitialLdif();
 
-   public void setImportInitialLdif(String importInitialLdif);
+   public void setImportInitialLdif(String importInitialLdif);*/
 
 }

Modified: trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSUtil.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSUtil.java	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends/OpenDSUtil.java	2006-11-01 22:15:12 UTC (rev 5554)
@@ -24,11 +24,15 @@
 package org.jboss.portal.test.framework.embedded.opends;
 
 import org.jboss.logging.Logger;
-/*import org.opends.server.tools.LDAPCompare;
+import org.opends.server.tools.LDAPCompare;
 import org.opends.server.tools.LDAPDelete;
 import org.opends.server.tools.LDAPModify;
-import org.opends.server.tools.LDAPSearch;*/
+import org.opends.server.tools.LDAPSearch;
 
+import java.net.URL;
+import java.io.File;
+import java.util.StringTokenizer;
+
 /**
  * Class forked from JBoss Application Server testsuite: http://anonsvn.jboss.org/repos/jbossas/trunk/testsuite/src/main/org/jboss/test/security/test/opends/
  * <p/>
@@ -55,7 +59,7 @@
     * @param ldifURL (use getDeployURL of JBossTestxxx)
     * @return whether the add was success
     */
-   /*public boolean addLDIF(String serverHost, String port, String admin,
+   public boolean addLDIF(String serverHost, String port, String admin,
          String adminpwd, URL ldifURL)
    {
       File ldifFile = new File(ldifURL.getPath());
@@ -67,7 +71,7 @@
       log.debug("addLDIF:" + print(cmd));
       //return LDAPModify.mainModify(cmd) == 0;
       return LDAPModify.mainModify(cmd, false, System.out, System.err) == 0;
-   }*/
+   }
 
    /**
     * Delete a DN in the Directory Server
@@ -79,7 +83,7 @@
     * @param recursive should children also go?
     * @return whether the delete op was success
     */
-   /*public boolean deleteDN(String serverHost, String port, String admin,
+   public boolean deleteDN(String serverHost, String port, String admin,
          String adminpwd, String dnToDelete, boolean recursive)
    {
       String rec = recursive ? "-x" : " ";
@@ -90,7 +94,7 @@
       log.debug("deleteDN:" + print(cmd));
       //return LDAPDelete.mainDelete(cmd) == 0;
       return LDAPDelete.mainDelete(cmd, false, System.out, System.err) == 0;
-   }*/
+   }
 
    /**
     * Check whether a DN exists. Typically before you do a ldap delete
@@ -99,14 +103,14 @@
     * @param dn
     * @return whether the DN exists?
     */
-   /*public boolean existsDN(String serverHost, String port, String dn)
+   public boolean existsDN(String serverHost, String port, String dn)
    {
       String[] cmd = new String[] {"-h", serverHost, "-p",
             port, "-b", dn ,"-s", "sub", "objectclass=*"};
       log.debug("existsDN:" + print(cmd));
       //return LDAPSearch.mainSearch(cmd) == 0;
       return LDAPSearch.mainSearch(cmd, false, System.out, System.err) == 0;
-   }*/
+   }
 
    /**
     * Issue a ldapCompare in the standard ldapCompare cmd line syntax
@@ -114,13 +118,13 @@
     * @param cmdline
     * @return whether ldapCompare was success
     */
-   /* public boolean ldapCompare(String cmdline)
+   public boolean ldapCompare(String cmdline)
    {
       String[] strArr = getStringArr(cmdline);
       log.debug("ldapCompare:"+print(strArr));
       //return LDAPCompare.mainCompare(strArr) == 0;
       return LDAPCompare.mainCompare(strArr, false, System.out, System.err) == 0;
-   }*/
+   }
 
    /**
     * Issue a ldapdelete in the standard ldapdelete cmd line syntax
@@ -128,13 +132,13 @@
     * @param cmdline
     * @return whether ldapmodify was success
     */
-   /*public boolean ldapDelete(String cmdline)
+   public boolean ldapDelete(String cmdline)
    {
       String[] strArr = getStringArr(cmdline);
       log.debug("ldapDelete:"+print(strArr));
       //return LDAPDelete.mainDelete(strArr) == 0;
       return LDAPDelete.mainDelete(strArr, false, System.out, System.err) == 0;
-   }*/
+   }
 
    /**
     * Issue a ldapmodify in the standard ldapmodify cmd line syntax
@@ -142,18 +146,18 @@
     * @param cmdline
     * @return whether ldapmodify was success
     */
-   /*public boolean ldapModify(String cmdline)
+   public boolean ldapModify(String cmdline)
    {
       String[] strArr = getStringArr(cmdline);
       log.debug("ldapModify:"+print(strArr));
       //return LDAPModify.mainModify(strArr) == 0;
       return LDAPModify.mainModify(strArr, false, System.out, System.err) == 0;
-   }*/
+   }
 
    //***************************************************************
    //   PRIVATE METHODS
    //***************************************************************
-   /*private String[] getStringArr(String str)
+   private String[] getStringArr(String str)
    {
       StringTokenizer st = new StringTokenizer(str);
       int num = st.countTokens();
@@ -164,14 +168,14 @@
          strarr[i++] = st.nextToken();
       }
       return strarr;
-   }*/
+   }
 
-   /*private String print(String[] arr)
+   private String print(String[] arr)
    {
       StringBuffer sb = new StringBuffer();
       int len = arr != null ? arr.length : 0;
       for(int i=0; i < len; i++)
          sb.append(arr[i]);
       return sb.toString();
-   }*/
+   }
 }

Modified: trunk/test/src/resources/portal-test-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/test/src/resources/portal-test-sar/META-INF/jboss-service.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/test/src/resources/portal-test-sar/META-INF/jboss-service.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -39,8 +39,8 @@
    </mbean>
 
    <!-- OpenDS service (LDAP)  -->
-   <!--<mbean
+   <mbean
       code="org.jboss.portal.test.framework.embedded.opends.OpenDSService"
       name="portal.test:service=OpenDSService">
-   </mbean>-->
+   </mbean>
 </server>
\ No newline at end of file

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/testsuite/build.xml	2006-11-01 22:15:12 UTC (rev 5554)
@@ -62,6 +62,11 @@
    <target name="init">
       <mkdir dir="${log.dir}"/>
       <mkdir dir="${reports.dir}"/>
+      <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
+      <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
+      <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
+      <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+      <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
    </target>
    <!-- copy all logs to testsuite/output/logs -->
    <target name="copy-logs">
@@ -110,7 +115,10 @@
 
    <!-- executes all modules' tests -->
    <target name="tests" depends="init">
-   	<server:start name="default"/>
+      <fail unless="HAVE_JDK_1.5">
+           Unsupported Java version: You need at least JDK1.5 to run testsuite
+      </fail>
+      <server:start name="default"/>
    	<sequential>
          <antcall target="agent-deploy"/>
          <antcall target="internal-test-module">
@@ -186,12 +194,17 @@
 
    <!-- Deployment of agent -->
    <target name="agent-deploy">
+      <mkdir dir="${env.JBOSS_HOME}/server/default/conf/opends"/>
+      <copy todir="${env.JBOSS_HOME}/server/default/conf/opends" overwrite="true">
+         <fileset dir="../test/output/etc/opends"/>
+      </copy>
       <deploy file="../test/output/lib/portal-test.sar" config="default"/>
    </target>
 
    <!-- Undeployment of agent -->
    <target name="agent-undeploy">
       <undeploy file="../test/output/lib/portal-test.sar" config="default"/>
+      <delete dir="${env.JBOSS_HOME}/server/default/conf/opends"/>
    </target>
 
 	<target name="help">

Modified: trunk/tools/etc/buildfragments/buildmagic.ent
===================================================================
--- trunk/tools/etc/buildfragments/buildmagic.ent	2006-11-01 16:46:19 UTC (rev 5553)
+++ trunk/tools/etc/buildfragments/buildmagic.ent	2006-11-01 22:15:12 UTC (rev 5554)
@@ -37,6 +37,7 @@
   <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
   <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
   <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
 
   <!-- Setup the project environment. -->
   <dirname property="project.root" file="${basedir}"/>




More information about the jboss-svn-commits mailing list