directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r700023 - in /directory/studio/trunk/apacheds: ./ resources/conf/ resources/libs/ src/main/java/org/apache/directory/studio/apacheds/ src/main/java/org/apache/directory/studio/apacheds/actions/ src/main/java/org/apache/directory/studio/apac...
Date Mon, 29 Sep 2008 08:15:58 GMT
Author: pamarcelot
Date: Mon Sep 29 01:15:58 2008
New Revision: 700023

URL: http://svn.apache.org/viewvc?rev=700023&view=rev
Log:
Part of a fix for DIRSTUDIO-405 (Update the Apache DS plugin to use Apache DS 1.5.4 dependencies).

Added:
    directory/studio/trunk/apacheds/resources/conf/server-1.5.3.xml   (props changed)
      - copied unchanged from r699224, directory/studio/trunk/apacheds/resources/conf/server.xml
    directory/studio/trunk/apacheds/resources/conf/server-1.5.4.xml
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServerVersion.java
Removed:
    directory/studio/trunk/apacheds/resources/conf/server.xml
Modified:
    directory/studio/trunk/apacheds/pom.xml
    directory/studio/trunk/apacheds/resources/libs/   (props changed)
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/RunAction.java
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandlerIO.java
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java

Modified: directory/studio/trunk/apacheds/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/pom.xml?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/pom.xml (original)
+++ directory/studio/trunk/apacheds/pom.xml Mon Sep 29 01:15:58 2008
@@ -119,6 +119,10 @@
  org.apache.directory.studio.apacheds.configuration,
  org.apache.directory.studio.connection.core;resolution:=optional
             </Require-Bundle>
+            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
+            <Embed-Directory>lib</Embed-Directory>
+            <Embed-StripGroup>true</Embed-StripGroup>
+            <Embed-Transitive>true</Embed-Transitive>
             <Export-Package>!*</Export-Package>
             <Import-Package>!*</Import-Package>
           </instructions>
@@ -139,244 +143,498 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
         <executions>
+          <!-- Apache DS 1.5.3 Libraries -->
           <execution>
-            <id>copy-server-libraries</id>
+            <id>copy-apacheds-1.5.3-libraries</id>
             <phase>process-resources</phase>
             <goals>
               <goal>copy</goal>
             </goals>
             <configuration>
-              <outputDirectory>resources/libs</outputDirectory>
+              <outputDirectory>resources/libs/apacheds-1.5.3</outputDirectory>
               <artifactItems>
                 <artifactItem>
                   <groupId>antlr</groupId>
                   <artifactId>antlr</artifactId>
-          <version>2.7.7</version>
+                  <version>2.7.7</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-bootstrap-extract</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-bootstrap-partition</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-btree-base</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-core</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-core-constants</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-core-entry</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-core-shared</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-jdbm</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-jdbm-store</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-kerberos-shared</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.studio</groupId>
                   <artifactId>apacheds-launcher</artifactId>
-          <version>1.2.0</version>
+                  <version>1.2.0</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-changepw</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-dns</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-kerberos</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-ldap</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-protocol-ntp</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-protocol-shared</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-schema-bootstrap</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-schema-extras</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-schema-registries</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-server-jndi</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-server-xml</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-utils</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-xbean-spring</artifactId>
+                  <version>1.5.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-cli</groupId>
+                  <artifactId>commons-cli</artifactId>
+                  <version>1.1</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-collections</groupId>
+                  <artifactId>commons-collections</artifactId>
+                  <version>3.2</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-daemon</groupId>
+                  <artifactId>commons-daemon</artifactId>
+                  <version>1.0.1</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-lang</groupId>
+                  <artifactId>commons-lang</artifactId>
+                  <version>2.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.daemon</groupId>
+                  <artifactId>daemon-bootstrappers</artifactId>
+                  <version>1.1.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>jcl104-over-slf4j</artifactId>
+                  <version>1.4.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>log4j</groupId>
+                  <artifactId>log4j</artifactId>
+                  <version>1.2.14</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.mina</groupId>
+                  <artifactId>mina-core</artifactId>
+                  <version>1.1.6</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.mina</groupId>
+                  <artifactId>mina-filter-ssl</artifactId>
+                  <version>1.1.6</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.shared</groupId>
+                  <artifactId>shared-asn1</artifactId>
+                  <version>0.9.11</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.shared</groupId>
+                  <artifactId>shared-asn1-codec</artifactId>
+                  <version>0.9.11</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.shared</groupId>
+                  <artifactId>shared-bouncycastle-reduced</artifactId>
+                  <version>0.9.11</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.shared</groupId>
+                  <artifactId>shared-ldap</artifactId>
+                  <version>0.9.11</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.shared</groupId>
+                  <artifactId>shared-ldap-constants</artifactId>
+                  <version>0.9.11</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>slf4j-api</artifactId>
+                  <version>1.4.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>slf4j-log4j12</artifactId>
+                  <version>1.4.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.springframework</groupId>
+                  <artifactId>spring-beans</artifactId>
+                  <version>2.0.6</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.springframework</groupId>
+                  <artifactId>spring-context</artifactId>
+                  <version>2.0.6</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.springframework</groupId>
+                  <artifactId>spring-core</artifactId>
+                  <version>2.0.6</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.xbean</groupId>
+                  <artifactId>xbean-spring</artifactId>
+                  <version>3.3</version>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+          <!-- Apache DS 1.5.4 Libraries -->
+          <execution>
+            <id>copy-apacheds-1.5.4-libraries</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>resources/libs/apacheds-1.5.4</outputDirectory>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>antlr</groupId>
+                  <artifactId>antlr</artifactId>
+                  <version>2.7.7</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-bootstrap-extract</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-bootstrap-partition</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core-avl</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core-constants</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core-cursor</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core-entry</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-core-shared</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-jdbm</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-jdbm-store</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-kerberos-shared</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.studio</groupId>
+                  <artifactId>apacheds-launcher</artifactId>
+                  <version>1.2.0</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-protocol-changepw</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-protocol-dns</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-protocol-kerberos</artifactId>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-ldap</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-ntp</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-protocol-shared</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-schema-bootstrap</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-schema-extras</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-schema-registries</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-server-jndi</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-server-xml</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-utils</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-xbean-spring</artifactId>
-          <version>1.5.3</version>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-xdbm-base</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-xdbm-search</artifactId>
+                  <version>1.5.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.directory.server</groupId>
+                  <artifactId>apacheds-xdbm-tools</artifactId>
+                  <version>1.5.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>commons-cli</groupId>
                   <artifactId>commons-cli</artifactId>
-          <version>1.1</version>
+                  <version>1.1</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>commons-collections</groupId>
                   <artifactId>commons-collections</artifactId>
-          <version>3.2</version>
+                  <version>3.2</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>commons-daemon</groupId>
                   <artifactId>commons-daemon</artifactId>
-          <version>1.0.1</version>
+                  <version>1.0.1</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>commons-lang</groupId>
                   <artifactId>commons-lang</artifactId>
-          <version>2.3</version>
+                  <version>2.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.daemon</groupId>
                   <artifactId>daemon-bootstrappers</artifactId>
-          <version>1.1.3</version>
+                  <version>1.1.4</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.slf4j</groupId>
                   <artifactId>jcl104-over-slf4j</artifactId>
-          <version>1.4.3</version>
+                  <version>1.4.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>log4j</groupId>
                   <artifactId>log4j</artifactId>
-          <version>1.2.14</version>
+                  <version>1.2.14</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.mina</groupId>
                   <artifactId>mina-core</artifactId>
-          <version>1.1.6</version>
+                  <version>1.1.6</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.mina</groupId>
                   <artifactId>mina-filter-ssl</artifactId>
-          <version>1.1.6</version>
+                  <version>1.1.6</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.shared</groupId>
                   <artifactId>shared-asn1</artifactId>
-          <version>0.9.11</version>
+                  <version>0.9.12</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.shared</groupId>
                   <artifactId>shared-asn1-codec</artifactId>
-          <version>0.9.11</version>
+                  <version>0.9.12</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.shared</groupId>
                   <artifactId>shared-bouncycastle-reduced</artifactId>
-          <version>0.9.11</version>
+                  <version>0.9.12</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.shared</groupId>
                   <artifactId>shared-ldap</artifactId>
-          <version>0.9.11</version>
+                  <version>0.9.12</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.shared</groupId>
                   <artifactId>shared-ldap-constants</artifactId>
-          <version>0.9.11</version>
+                  <version>0.9.12</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-api</artifactId>
-          <version>1.4.3</version>
+                  <version>1.4.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-log4j12</artifactId>
-          <version>1.4.3</version>
+                  <version>1.4.3</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-beans</artifactId>
-        <version>2.0.6</version>
+                  <version>2.0.6</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-context</artifactId>
-        <version>2.0.6</version>
+                  <version>2.0.6</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-core</artifactId>
-        <version>2.0.6</version>
+                  <version>2.0.6</version>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.xbean</groupId>
                   <artifactId>xbean-spring</artifactId>
-        <version>3.3</version>
+                  <version>3.3</version>
                 </artifactItem>
               </artifactItems>
             </configuration>

Propchange: directory/studio/trunk/apacheds/resources/conf/server-1.5.3.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: directory/studio/trunk/apacheds/resources/conf/server-1.5.4.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/resources/conf/server-1.5.4.xml?rev=700023&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/resources/conf/server-1.5.4.xml (added)
+++ directory/studio/trunk/apacheds/resources/conf/server-1.5.4.xml Mon Sep 29 01:15:58 2008
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+
+<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0" 
+			  xmlns:s="http://www.springframework.org/schema/beans"
+			  xmlns="http://apacheds.org/config/1.0">
+
+  <defaultDirectoryService id="directoryService" instanceId="default"
+                           workingDirectory="example.com"
+                           allowAnonymousAccess="true"
+                           accessControlEnabled="false"
+                           denormalizeOpAttrsEnabled="false">
+    <systemPartition>
+      <!-- use the following partitionConfiguration to override defaults for -->
+      <!-- the system partition                                              -->
+      <jdbmPartition id="system" cacheSize="100" suffix="ou=system" optimizerEnabled="true" syncOnWrite="true">
+        <indexedAttributes>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
+          <jdbmIndex attributeId="ou" cacheSize="100"/>
+          <jdbmIndex attributeId="uid" cacheSize="100"/>
+          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
+        </indexedAttributes>
+      </jdbmPartition>
+    </systemPartition>
+
+    <partitions>
+      <!-- NOTE: when specifying new partitions you need not include those   -->
+      <!-- attributes below with OID's which are the system indices, if left -->
+      <!-- out they will be automatically configured for you with defaults.  -->
+      <jdbmPartition id="example" cacheSize="100" suffix="dc=example,dc=com" optimizerEnabled="true"
+                     syncOnWrite="true">
+        <indexedAttributes>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
+          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
+          <jdbmIndex attributeId="dc" cacheSize="100"/>
+          <jdbmIndex attributeId="ou" cacheSize="100"/>
+          <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
+          <jdbmIndex attributeId="uid" cacheSize="100"/>
+          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
+        </indexedAttributes>
+      </jdbmPartition>
+    </partitions>
+
+    <interceptors>
+      <normalizationInterceptor/>
+      <authenticationInterceptor/>
+      <aciAuthorizationInterceptor/>
+      <defaultAuthorizationInterceptor/>
+      <exceptionInterceptor/>
+      <operationalAttributeInterceptor/>
+
+      <!-- Uncomment to enable the password policy interceptor
+      <passwordPolicyInterceptor/>
+      <keyDerivationInterceptor/>
+      -->
+
+      <schemaInterceptor/>
+      <subentryInterceptor/>
+      <collectiveAttributeInterceptor/>
+      <eventInterceptor/>
+      <triggerInterceptor/>
+
+      <!-- Uncomment to enable replication interceptor
+      <replicationInterceptor>
+        <configuration>
+          <replicationConfiguration serverPort="10390" peerReplicas="instance_b@localhost:10392">
+            <replicaId>
+              <replicaId id="instance_a"/>
+            </replicaId>
+          </replicationConfiguration>
+        </configuration>
+      </replicationInterceptor>
+      -->
+    </interceptors>
+  </defaultDirectoryService>
+
+  <standardThreadPool id="standardThreadPool" maxThreads="8"/>
+  <datagramAcceptor id="datagramAcceptor" logicExecutor="#standardThreadPool"/>
+  <socketAcceptor id="socketAcceptor" logicExecutor="#standardThreadPool"/>
+
+<!--  missing  atou=users,dc=example,dc=com
+  <changePasswordServer ipPort="60464">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </changePasswordServer>
+-->
+<!--  missing atou=users,dc=example,dc=com
+  <kdcServer ipPort="60088">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </kdcServer>
+-->
+  <ntpServer ipPort="60123">
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </ntpServer>
+<!--  missing atou=users,dc=example,dc=com
+  <dnsServer ipPort="8053">
+    <directoryService>#directoryService</directoryService>
+    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </dnsServer>
+-->
+
+  <ldapService id="ldapsService"
+              enabled="true"
+              ipPort="10636"
+              enableLdaps="true">
+    <directoryService>#directoryService</directoryService>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+  </ldapService>
+
+
+  <ldapService id="ldapService"
+              ipPort="10389"
+              allowAnonymousAccess="false"
+              saslHost="ldap.example.com"
+              saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM"
+              searchBaseDn="ou=users,ou=system"
+              maxTimeLimit="15000"
+              maxSizeLimit="1000">
+
+    <directoryService>#directoryService</directoryService>
+    <socketAcceptor>#socketAcceptor</socketAcceptor>
+
+    <!-- The list of supported authentication mechanisms.                   -->
+    <saslMechanismHandlers>
+      <simpleMechanismHandler mech-name="SIMPLE"/>
+      <cramMd5MechanismHandler mech-name="CRAM-MD5" />
+      <digestMd5MechanismHandler mech-name="DIGEST-MD5" />
+      <gssapiMechanismHandler mech-name="GSSAPI" />
+      <ntlmMechanismHandler mech-name="NTLM" ntlmProviderFqcn="com.foo.Bar"/>
+      <ntlmMechanismHandler mech-name="GSS-SPNEGO" ntlmProviderFqcn="com.foo.Bar"/>
+    </saslMechanismHandlers>
+
+    <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
+    <saslQop>
+      <s:value>auth</s:value>
+      <s:value>auth-int</s:value>
+      <s:value>auth-conf</s:value>
+    </saslQop>
+
+    <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
+    <saslRealms>
+      <s:value>example.com</s:value>
+      <s:value>apache.org</s:value>
+    </saslRealms>
+
+    <!-- the collection of extended operation handlers to install           -->
+    <extendedOperationHandlers>
+      <startTlsHandler/>
+      <gracefulShutdownHandler/>
+      <launchDiagnosticUiHandler/>
+      <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.-->
+      <!--storedProcedureExtendedOperationHandler/-->
+    </extendedOperationHandlers>
+  </ldapService>
+
+
+  <apacheDS id="apacheDS"
+            synchPeriodMillis="15000"
+            allowAnonymousAccess="false">
+
+    <directoryService>#directoryService</directoryService>
+    <ldapService>#ldapService</ldapService>
+    <ldapsService>#ldapsService</ldapsService>
+  </apacheDS>
+
+  <!-- another bean I didn't convert -->
+  <spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+    <spring:property name="customEditors">
+      <spring:map>
+        <spring:entry key="javax.naming.directory.Attributes">
+          <spring:bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+        </spring:entry>
+      </spring:map>
+    </spring:property>
+  </spring:bean>
+</spring:beans>

Propchange: directory/studio/trunk/apacheds/resources/libs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Sep 29 01:15:58 2008
@@ -1 +1 @@
-*.jar
+apacheds-*

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java Mon Sep 29 01:15:58 2008
@@ -27,6 +27,7 @@
 import java.io.OutputStream;
 import java.net.URL;
 
+import org.apache.directory.studio.apacheds.model.Server;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
@@ -48,37 +49,19 @@
     /** The name of the libraries folder */
     private static final String LIBRARIES_FOLDER_NAME = "libs";
     private static final String APACHEDS = "apacheds";
-    /** The version of ApacheDS bundle with the plugin */
-    private static final String APACHEDS_VERSION = "1.5.3";
 
     /** The line separator */
     public static final String LINE_SEPARATOR = System.getProperty( "line.separator" );
 
-    /** This array of String contains all filenames of the needed libraries to launch Apache DS */
-    public static final String[] apachedsLibraries = new String[]
-        { "antlr-2.7.7.jar", "apacheds-bootstrap-extract-1.5.3.jar", "apacheds-bootstrap-partition-1.5.3.jar",
-            "apacheds-btree-base-1.5.3.jar", "apacheds-core-1.5.3.jar", "apacheds-core-constants-1.5.3.jar",
-            "apacheds-core-entry-1.5.3.jar", "apacheds-core-shared-1.5.3.jar", "apacheds-jdbm-1.5.3.jar",
-            "apacheds-jdbm-store-1.5.3.jar", "apacheds-kerberos-shared-1.5.3.jar", "apacheds-launcher-1.2.0.jar",
-            "apacheds-protocol-changepw-1.5.3.jar", "apacheds-protocol-dns-1.5.3.jar",
-            "apacheds-protocol-kerberos-1.5.3.jar", "apacheds-protocol-ldap-1.5.3.jar",
-            "apacheds-protocol-ntp-1.5.3.jar", "apacheds-protocol-shared-1.5.3.jar",
-            "apacheds-schema-bootstrap-1.5.3.jar", "apacheds-schema-extras-1.5.3.jar",
-            "apacheds-schema-registries-1.5.3.jar", "apacheds-server-jndi-1.5.3.jar", "apacheds-server-xml-1.5.3.jar",
-            "apacheds-utils-1.5.3.jar", "apacheds-xbean-spring-1.5.3.jar", "commons-cli-1.1.jar",
-            "commons-collections-3.2.jar", "commons-daemon-1.0.1.jar", "commons-lang-2.3.jar",
-            "daemon-bootstrappers-1.1.3.jar", "jcl104-over-slf4j-1.4.3.jar", "log4j-1.2.14.jar", "mina-core-1.1.6.jar",
-            "mina-filter-ssl-1.1.6.jar", "shared-asn1-0.9.11.jar", "shared-asn1-codec-0.9.11.jar",
-            "shared-bouncycastle-reduced-0.9.11.jar", "shared-ldap-0.9.11.jar", "shared-ldap-constants-0.9.11.jar",
-            "slf4j-api-1.4.3.jar", "slf4j-log4j12-1.4.3.jar", "spring-beans-2.0.6.jar", "spring-context-2.0.6.jar",
-            "spring-core-2.0.6.jar", "xbean-spring-3.3.jar" };
-
 
     /**
      * Verifies that the libraries folder exists and contains the jar files 
      * needed to launch the server.
+     * 
+     * @param server
+     *      the server
      */
-    public static void verifyLibrariesFolder()
+    public static void verifyLibrariesFolder( Server server )
     {
         IPath stateLocationPath = ApacheDsPlugin.getDefault().getStateLocation();
 
@@ -91,7 +74,7 @@
         }
 
         // Specific Apache DS folder
-        IPath apacheDsFolderPath = librariesFolderPath.append( APACHEDS + "-" + APACHEDS_VERSION );
+        IPath apacheDsFolderPath = librariesFolderPath.append( APACHEDS + "-" + server.getVersion() );
         File apacheDsFolder = new File( apacheDsFolderPath.toOSString() );
         if ( !apacheDsFolder.exists() )
         {
@@ -99,7 +82,7 @@
         }
 
         // Jar libraries
-        for ( String apachedsLibraryFilename : apachedsLibraries )
+        for ( String apachedsLibraryFilename : getApacheDsLibraries( server ) )
         {
             IPath apachedsLibraryPath = apacheDsFolderPath.append( apachedsLibraryFilename );
             File apachedsLibrary = new File( apachedsLibraryPath.toOSString() );
@@ -121,6 +104,75 @@
 
 
     /**
+     * Gets an array containing the names of the Apache DS libraries, according
+     * to the given server.
+     *
+     * @param server
+     *      the server
+     * @return
+     *      an array containing the names of the Apache DS libraries, according
+     * to the given server
+     */
+    public static String[] getApacheDsLibraries( Server server )
+    {
+        if ( server != null )
+        {
+            switch ( server.getVersion() )
+            {
+                case VERSION_1_5_4:
+                    // TODO modify this
+                    return new String[]
+                        { "antlr-2.7.7.jar", "xbean-spring-3.3.jar", "apacheds-bootstrap-extract-1.5.4.jar",
+                            "apacheds-bootstrap-partition-1.5.4.jar", "apacheds-core-1.5.4.jar",
+                            "apacheds-core-avl-1.5.4.jar", "apacheds-core-constants-1.5.4.jar",
+                            "apacheds-core-cursor-1.5.4.jar", "apacheds-core-entry-1.5.4.jar",
+                            "apacheds-core-shared-1.5.4.jar", "apacheds-jdbm-1.5.4.jar",
+                            "apacheds-jdbm-store-1.5.4.jar", "apacheds-kerberos-shared-1.5.4.jar",
+                            "apacheds-launcher-1.2.0.jar", "apacheds-protocol-changepw-1.5.4.jar",
+                            "apacheds-protocol-dns-1.5.4.jar", "apacheds-protocol-kerberos-1.5.4.jar",
+                            "apacheds-protocol-ldap-1.5.4.jar", "apacheds-protocol-ntp-1.5.4.jar",
+                            "apacheds-protocol-shared-1.5.4.jar", "apacheds-schema-bootstrap-1.5.4.jar",
+                            "apacheds-schema-extras-1.5.4.jar", "apacheds-schema-registries-1.5.4.jar",
+                            "apacheds-server-jndi-1.5.4.jar", "apacheds-server-xml-1.5.4.jar",
+                            "apacheds-utils-1.5.4.jar", "apacheds-xbean-spring-1.5.4.jar",
+                            "apacheds-xdbm-base-1.5.4.jar", "apacheds-xdbm-search-1.5.4.jar",
+                            "apacheds-xdbm-tools-1.5.4.jar", "commons-cli-1.1.jar", "commons-collections-3.2.jar",
+                            "commons-daemon-1.0.1.jar", "commons-lang-2.3.jar", "daemon-bootstrappers-1.1.4.jar",
+                            "jcl104-over-slf4j-1.4.3.jar", "log4j-1.2.14.jar", "mina-core-1.1.6.jar",
+                            "mina-filter-ssl-1.1.6.jar", "shared-asn1-0.9.12.jar", "shared-asn1-codec-0.9.12.jar",
+                            "shared-bouncycastle-reduced-0.9.12.jar", "shared-ldap-0.9.12.jar",
+                            "shared-ldap-constants-0.9.12.jar", "slf4j-api-1.4.3.jar", "slf4j-log4j12-1.4.3.jar",
+                            "spring-beans-2.0.6.jar", "spring-context-2.0.6.jar", "spring-core-2.0.6.jar" };
+                case VERSION_1_5_3:
+                    return new String[]
+                        { "antlr-2.7.7.jar", "apacheds-bootstrap-extract-1.5.3.jar",
+                            "apacheds-bootstrap-partition-1.5.3.jar", "apacheds-btree-base-1.5.3.jar",
+                            "apacheds-core-1.5.3.jar", "apacheds-core-constants-1.5.3.jar",
+                            "apacheds-core-entry-1.5.3.jar", "apacheds-core-shared-1.5.3.jar",
+                            "apacheds-jdbm-1.5.3.jar", "apacheds-jdbm-store-1.5.3.jar",
+                            "apacheds-kerberos-shared-1.5.3.jar", "apacheds-launcher-1.2.0.jar",
+                            "apacheds-protocol-changepw-1.5.3.jar", "apacheds-protocol-dns-1.5.3.jar",
+                            "apacheds-protocol-kerberos-1.5.3.jar", "apacheds-protocol-ldap-1.5.3.jar",
+                            "apacheds-protocol-ntp-1.5.3.jar", "apacheds-protocol-shared-1.5.3.jar",
+                            "apacheds-schema-bootstrap-1.5.3.jar", "apacheds-schema-extras-1.5.3.jar",
+                            "apacheds-schema-registries-1.5.3.jar", "apacheds-server-jndi-1.5.3.jar",
+                            "apacheds-server-xml-1.5.3.jar", "apacheds-utils-1.5.3.jar",
+                            "apacheds-xbean-spring-1.5.3.jar", "commons-cli-1.1.jar", "commons-collections-3.2.jar",
+                            "commons-daemon-1.0.1.jar", "commons-lang-2.3.jar", "daemon-bootstrappers-1.1.3.jar",
+                            "jcl104-over-slf4j-1.4.3.jar", "log4j-1.2.14.jar", "mina-core-1.1.6.jar",
+                            "mina-filter-ssl-1.1.6.jar", "shared-asn1-0.9.11.jar", "shared-asn1-codec-0.9.11.jar",
+                            "shared-bouncycastle-reduced-0.9.11.jar", "shared-ldap-0.9.11.jar",
+                            "shared-ldap-constants-0.9.11.jar", "slf4j-api-1.4.3.jar", "slf4j-log4j12-1.4.3.jar",
+                            "spring-beans-2.0.6.jar", "spring-context-2.0.6.jar", "spring-core-2.0.6.jar",
+                            "xbean-spring-3.3.jar" };
+            };
+        }
+
+        return new String[0];
+    }
+
+
+    /**
      * Copy the given library.
      *
      * @param library
@@ -173,13 +225,15 @@
     /**
      * Get the path to the Apache DS libraries folder.
      *
+     * @param server
+     *      the server
      * @return
      *      the path to the Apache DS libraries folder
      */
-    public static IPath getApacheDsLibrariesFolder()
+    public static IPath getApacheDsLibrariesFolder( Server server )
     {
         return ApacheDsPlugin.getDefault().getStateLocation().append( LIBRARIES_FOLDER_NAME ).append(
-            APACHEDS + "-" + APACHEDS_VERSION );
+            APACHEDS + "-" + server.getVersion() );
     }
 
 
@@ -230,7 +284,7 @@
 
             // Copying server.xml file
             File serverXmlFile = new File( confFolder, "server.xml" );
-            copyConfigurationFile( "server.xml", serverXmlFile );
+            copyConfigurationFile( "server-1.5.4.xml", serverXmlFile );
 
             // Creating log4j.properties file to the serverSocket folder
             File log4jPropertiesServerSocketFile = new File( serverSocketFolder, "log4j.properties" );

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/RunAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/RunAction.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/RunAction.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/RunAction.java Mon Sep 29 01:15:58 2008
@@ -22,16 +22,20 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.studio.apacheds.ApacheDsPlugin;
 import org.apache.directory.studio.apacheds.ApacheDsPluginConstants;
 import org.apache.directory.studio.apacheds.ApacheDsPluginUtils;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
 import org.apache.directory.studio.apacheds.configuration.model.v153.ServerConfigurationV153;
 import org.apache.directory.studio.apacheds.configuration.model.v153.ServerXmlIOV153;
+import org.apache.directory.studio.apacheds.configuration.model.v154.ServerConfigurationV154;
+import org.apache.directory.studio.apacheds.configuration.model.v154.ServerXmlIOV154;
 import org.apache.directory.studio.apacheds.jobs.LaunchServerJob;
 import org.apache.directory.studio.apacheds.model.Server;
 import org.apache.directory.studio.apacheds.views.ServersView;
@@ -111,15 +115,12 @@
                 final Server server = ( Server ) selection.getFirstElement();
 
                 // Parsing the 'server.xml' file
-                ServerXmlIOV153 serverXmlIOV153 = new ServerXmlIOV153();
-                ServerConfigurationV153 serverConfiguration = null;
+                ServerConfiguration serverConfiguration = null;
                 try
                 {
-                    serverConfiguration = ( ServerConfigurationV153 ) serverXmlIOV153.parse( new FileInputStream(
-                        new File( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() ).append(
-                            "conf" ).append( "server.xml" ).toOSString() ) ) );
+                    serverConfiguration = getServerConfiguration( server );
                 }
-                catch ( FileNotFoundException e )
+                catch ( IOException e )
                 {
                     reportErrorReadingServerConfiguration( e.getMessage() );
                     return;
@@ -173,7 +174,7 @@
                 }
 
                 // Verifying the libraries in the plugin's folder
-                ApacheDsPluginUtils.verifyLibrariesFolder();
+                ApacheDsPluginUtils.verifyLibrariesFolder( server );
 
                 // Creating, setting and launching the launch job
                 LaunchServerJob job = new LaunchServerJob( server, serverConfiguration );
@@ -187,6 +188,55 @@
 
 
     /**
+     * Gets the server configuration.
+     *
+     * @param server
+     *      the server
+     * @return
+     *      the associated server configuration
+     * @throws ServerXmlIOException 
+     * @throws ServerXmlIOException
+     * @throws IOException 
+     */
+    private ServerConfiguration getServerConfiguration( Server server ) throws ServerXmlIOException, IOException
+    {
+        InputStream fis = new FileInputStream( new File( ApacheDsPluginUtils.getApacheDsServersFolder().append(
+            server.getId() ).append( "conf" ).append( "server.xml" ).toOSString() ) );
+
+        // First we test with version 1.5.4
+        ServerXmlIOV154 serverXmlIOV154 = new ServerXmlIOV154();
+        if ( serverXmlIOV154.isValid( fis ) )
+        {
+            // Reseting the input stream
+            fis = new FileInputStream( new File( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() )
+                .append( "conf" ).append( "server.xml" ).toOSString() ) );
+
+            // Parsing and returning the server configuration
+            return serverXmlIOV154.parse( fis );
+        }
+
+        // Reseting the input stream
+        fis = new FileInputStream( new File( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() )
+            .append( "conf" ).append( "server.xml" ).toOSString() ) );
+
+        // Then we test with version 1.5.3
+        ServerXmlIOV153 serverXmlIOV153 = new ServerXmlIOV153();
+        if ( serverXmlIOV153.isValid( fis ) )
+        {
+            // Reseting the input stream
+            fis = new FileInputStream( new File( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() )
+                .append( "conf" ).append( "server.xml" ).toOSString() ) );
+
+            // Parsing and returning the server configuration
+            return serverXmlIOV153.parse( fis );
+        }
+
+        // No corresponding reader has been found, we return null
+        return null;
+    }
+
+
+    /**
      * Reports to the user an error message indicating the server 
      * configuration could not be read correctly.
      *
@@ -224,7 +274,36 @@
      *      an array of String containing the ports and their associated 
      * protocols which are already in use.
      */
-    private String[] getAlreadyInUseProtocolPorts( ServerConfigurationV153 serverConfiguration )
+    private String[] getAlreadyInUseProtocolPorts( ServerConfiguration serverConfiguration )
+    {
+        // Version 1.5.4
+        if ( serverConfiguration instanceof ServerConfigurationV154 )
+        {
+            return getAlreadyInUseProtocolPortsVersion154( ( ServerConfigurationV154 ) serverConfiguration );
+        }
+        // Version 1.5.3
+        else if ( serverConfiguration instanceof ServerConfigurationV153 )
+        {
+            return getAlreadyInUseProtocolPortsVersion153( ( ServerConfigurationV153 ) serverConfiguration );
+        }
+        else
+        {
+            return new String[0];
+        }
+    }
+
+
+    /**
+     * Gets an array of String containing the ports and their associated 
+     * protocols which are already in use.
+     *
+     * @param serverConfiguration
+     *      the 1.5.3 server configuration
+     * @return
+     *      an array of String containing the ports and their associated 
+     * protocols which are already in use.
+     */
+    private String[] getAlreadyInUseProtocolPortsVersion153( ServerConfigurationV153 serverConfiguration )
     {
         List<String> alreadyInUseProtocolPortsList = new ArrayList<String>();
 
@@ -245,6 +324,80 @@
                 alreadyInUseProtocolPortsList.add( "LDAPS (port " + serverConfiguration.getLdapsPort() + ")" );
             }
         }
+
+        // Kerberos
+        if ( serverConfiguration.isEnableKerberos() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getKerberosPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "Kerberos (port " + serverConfiguration.getKerberosPort() + ")" );
+            }
+        }
+
+        // DNS
+        if ( serverConfiguration.isEnableDns() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getDnsPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "DNS (port " + serverConfiguration.getDnsPort() + ")" );
+            }
+        }
+
+        // NTP
+        if ( serverConfiguration.isEnableNtp() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getNtpPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "NTP (port " + serverConfiguration.getNtpPort() + ")" );
+            }
+        }
+
+        // Change Password
+        if ( serverConfiguration.isEnableChangePassword() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getChangePasswordPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "ChangePassword (port "
+                    + serverConfiguration.getChangePasswordPort() + ")" );
+            }
+        }
+
+        return alreadyInUseProtocolPortsList.toArray( new String[0] );
+    }
+
+
+    /**
+     * Gets an array of String containing the ports and their associated 
+     * protocols which are already in use.
+     *
+     * @param serverConfiguration
+     *      the 1.5.4 server configuration
+     * @return
+     *      an array of String containing the ports and their associated 
+     * protocols which are already in use.
+     */
+    private String[] getAlreadyInUseProtocolPortsVersion154( ServerConfigurationV154 serverConfiguration )
+    {
+        List<String> alreadyInUseProtocolPortsList = new ArrayList<String>();
+
+        // LDAP
+        if ( serverConfiguration.isEnableLdap() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getLdapPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "LDAP (port " + serverConfiguration.getLdapPort() + ")" );
+            }
+        }
+
+        // LDAPS
+        if ( serverConfiguration.isEnableLdaps() )
+        {
+            if ( !AvailablePortFinder.available( serverConfiguration.getLdapsPort() ) )
+            {
+                alreadyInUseProtocolPortsList.add( "LDAPS (port " + serverConfiguration.getLdapsPort() + ")" );
+            }
+        }
+
         // Kerberos
         if ( serverConfiguration.isEnableKerberos() )
         {

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java Mon Sep 29 01:15:58 2008
@@ -29,7 +29,9 @@
 import org.apache.directory.studio.apacheds.ApacheDsPluginUtils;
 import org.apache.directory.studio.apacheds.ConsolesHandler;
 import org.apache.directory.studio.apacheds.LogMessageConsole;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.v153.ServerConfigurationV153;
+import org.apache.directory.studio.apacheds.configuration.model.v154.ServerConfigurationV154;
 import org.apache.directory.studio.apacheds.model.Server;
 import org.apache.directory.studio.apacheds.model.ServerStateEnum;
 import org.apache.log4j.net.SocketServer;
@@ -70,7 +72,7 @@
     private Server server;
 
     /** The configuration */
-    private ServerConfigurationV153 configuration;
+    private ServerConfiguration configuration;
 
     /** The launch that will be created when running the server */
     private ILaunch launch;
@@ -93,7 +95,7 @@
      * @param configuration
      *            the configuration
      */
-    public LaunchServerJob( Server server, ServerConfigurationV153 configuration )
+    public LaunchServerJob( Server server, ServerConfiguration configuration )
     {
         super( "" );
         this.server = server;
@@ -168,37 +170,7 @@
                     try
                     {
                         // Getting the port to test
-                        int port = 0;
-                        // LDAP
-                        if ( configuration.isEnableLdap() )
-                        {
-                            port = configuration.getLdapPort();
-                        }
-                        // LDAPS
-                        else if ( configuration.isEnableLdaps() )
-                        {
-                            port = configuration.getLdapsPort();
-                        }
-                        // Kerberos
-                        else if ( configuration.isEnableKerberos() )
-                        {
-                            port = configuration.getKerberosPort();
-                        }
-                        // DNS
-                        else if ( configuration.isEnableDns() )
-                        {
-                            port = configuration.getDnsPort();
-                        }
-                        // NTP
-                        else if ( configuration.isEnableNtp() )
-                        {
-                            port = configuration.getNtpPort();
-                        }
-                        // ChangePassword
-                        else if ( configuration.isEnableChangePassword() )
-                        {
-                            port = configuration.getChangePasswordPort();
-                        }
+                        int port = getTestingPort( configuration );
 
                         // If no protocol is enabled, we pass this and 
                         // declare the server as started
@@ -248,6 +220,125 @@
                     writeToInfoConsoleMessageStream( "Server stopped.\n" );
                 }
             }
+
+
+            /**
+             * Gets the testing port.
+             *
+             * @param configuration
+             *      the server configuration
+             * @return
+             *      the testing port
+             */
+            private int getTestingPort( ServerConfiguration configuration )
+            {
+                if ( configuration instanceof ServerConfigurationV154 )
+                {
+                    return getTestingPortVersion154( ( ServerConfigurationV154 ) configuration );
+                }
+                else if ( configuration instanceof ServerConfigurationV154 )
+                {
+                    return getTestingPortVersion153( ( ServerConfigurationV153 ) configuration );
+                }
+                else
+                {
+                    return 0;
+                }
+            }
+
+
+            /**
+             * Gets the testing port.
+             *
+             * @param configuration
+             *      the 1.5.4 server configuration
+             * @return
+             *      the testing port
+             */
+            private int getTestingPortVersion153( ServerConfigurationV153 configuration )
+            {
+                // LDAP
+                if ( configuration.isEnableLdap() )
+                {
+                    return configuration.getLdapPort();
+                }
+                // LDAPS
+                else if ( configuration.isEnableLdaps() )
+                {
+                    return configuration.getLdapsPort();
+                }
+                // Kerberos
+                else if ( configuration.isEnableKerberos() )
+                {
+                    return configuration.getKerberosPort();
+                }
+                // DNS
+                else if ( configuration.isEnableDns() )
+                {
+                    return configuration.getDnsPort();
+                }
+                // NTP
+                else if ( configuration.isEnableNtp() )
+                {
+                    return configuration.getNtpPort();
+                }
+                // ChangePassword
+                else if ( configuration.isEnableChangePassword() )
+                {
+                    return configuration.getChangePasswordPort();
+                }
+                else
+                {
+                    return 0;
+                }
+            }
+
+
+            /**
+             * Gets the testing port.
+             *
+             * @param configuration
+             *      the 1.5.4 server configuration
+             * @return
+             *      the testing port
+             */
+            private int getTestingPortVersion154( ServerConfigurationV154 configuration )
+            {
+                // LDAP
+                if ( configuration.isEnableLdap() )
+                {
+                    return configuration.getLdapPort();
+                }
+                // LDAPS
+                else if ( configuration.isEnableLdaps() )
+                {
+                    return configuration.getLdapsPort();
+                }
+                // Kerberos
+                else if ( configuration.isEnableKerberos() )
+                {
+                    return configuration.getKerberosPort();
+                }
+                // DNS
+                else if ( configuration.isEnableDns() )
+                {
+                    return configuration.getDnsPort();
+                }
+                // NTP
+                else if ( configuration.isEnableNtp() )
+                {
+                    return configuration.getNtpPort();
+                }
+                // ChangePassword
+                else if ( configuration.isEnableChangePassword() )
+                {
+                    return configuration.getChangePasswordPort();
+                }
+                else
+                {
+                    return 0;
+                }
+            }
         };
 
         // Starting the thread
@@ -415,8 +506,8 @@
 
             // Creating the classpath list
             List<String> classpath = new ArrayList<String>();
-            IPath apacheDsLibrariesFolder = ApacheDsPluginUtils.getApacheDsLibrariesFolder();
-            for ( String library : ApacheDsPluginUtils.apachedsLibraries )
+            IPath apacheDsLibrariesFolder = ApacheDsPluginUtils.getApacheDsLibrariesFolder( server );
+            for ( String library : ApacheDsPluginUtils.getApacheDsLibraries( server ) )
             {
                 IRuntimeClasspathEntry libraryClasspathEntry = JavaRuntime
                     .newArchiveRuntimeClasspathEntry( apacheDsLibrariesFolder.append( library ) );

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java Mon Sep 29 01:15:58 2008
@@ -42,6 +42,9 @@
     /** The ID of the server */
     private String id;
 
+    /** The version of the server */
+    private ServerVersion version = ServerVersion.VERSION_1_5_4;
+
     /** The state of the server */
     private ServerStateEnum state = ServerStateEnum.STOPPED;
 
@@ -270,6 +273,30 @@
     }
 
 
+    /**
+     * Gets the version of the server
+     *
+     * @return
+     *      the version of the server
+     */
+    public ServerVersion getVersion()
+    {
+        return version;
+    }
+
+
+    /**
+     * Sets the version of the server
+     *
+     * @param version
+     *      the version of the server
+     */
+    public void setVersion( ServerVersion version )
+    {
+        this.version = version;
+    }
+
+
     /* (non-Javadoc)
      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
      */

Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServerVersion.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServerVersion.java?rev=700023&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServerVersion.java (added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServerVersion.java Mon Sep 29 01:15:58 2008
@@ -0,0 +1,54 @@
+/*
+ *  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. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.model;
+
+
+/**
+ * This enum represents the version of an Apache DS server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum ServerVersion
+{
+    /** Version 1.5.4 */
+    VERSION_1_5_4
+    {
+        /* (non-Javadoc)
+         * @see java.lang.Enum#toString()
+         */
+        public String toString()
+        {
+            return "1.5.4";
+        }
+    },
+
+    /** Version 1.5.3 */
+    VERSION_1_5_3
+    {
+        /* (non-Javadoc)
+         * @see java.lang.Enum#toString()
+         */
+        public String toString()
+        {
+            return "1.5.3";
+        }
+    }
+}

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandlerIO.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandlerIO.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandlerIO.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandlerIO.java Mon Sep 29 01:15:58 2008
@@ -50,6 +50,7 @@
     private static final String SERVER_TAG = "server";
     private static final String SERVER_ID_ATTRIBUTE = "id";
     private static final String SERVER_NAME_ATTRIBUTE = "name";
+    private static final String SERVER_VERSION_ATTRIBUTE = "version";
 
 
     /**
@@ -118,6 +119,34 @@
             server.setName( nameAttribute.getValue() );
         }
 
+        // Version
+        Attribute versionAttribute = element.attribute( SERVER_VERSION_ATTRIBUTE );
+        if ( versionAttribute != null )
+        {
+            if ( versionAttribute.getValue().equalsIgnoreCase( "1.5.4" ) )
+            {
+                server.setVersion( ServerVersion.VERSION_1_5_4 );
+            }
+            else if ( versionAttribute.getValue().equalsIgnoreCase( "1.5.3" ) )
+            {
+                server.setVersion( ServerVersion.VERSION_1_5_3 );
+            }
+            // <!> Compatibility mode <!>
+            // if the server does not have a version attribute, this means it's an
+            // Apache DS 1.5.3 server
+            else
+            {
+                server.setVersion( ServerVersion.VERSION_1_5_3 );
+            }
+        }
+        // <!> Compatibility mode <!>
+        // if the server does not have a version attribute, this means it's an
+        // Apache DS 1.5.3 server
+        else
+        {
+            server.setVersion( ServerVersion.VERSION_1_5_3 );
+        }
+
         return server;
     }
 
@@ -175,5 +204,8 @@
 
         // Name
         serverElement.addAttribute( SERVER_NAME_ATTRIBUTE, server.getName() );
+
+        // Version
+        serverElement.addAttribute( SERVER_VERSION_ATTRIBUTE, server.getVersion().toString() );
     }
 }

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java?rev=700023&r1=700022&r2=700023&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java Mon Sep 29 01:15:58 2008
@@ -70,6 +70,14 @@
         nameText.setBackground( parent.getBackground() );
         nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
+        // Version
+        Label versionLabel = new Label( composite, SWT.NONE );
+        versionLabel.setText( "Version:" );
+        Text versionText = new Text( composite, SWT.NONE );
+        versionText.setEditable( false );
+        versionText.setBackground( parent.getBackground() );
+        versionText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
         // Location
         Label locationLabel = new Label( composite, SWT.NONE );
         locationLabel.setText( "Location:" );
@@ -85,6 +93,7 @@
         if ( server != null )
         {
             nameText.setText( server.getName() );
+            versionText.setText( server.getVersion().toString() );
             locationText.setText( ApacheDsPluginUtils.getApacheDsServersFolder().append( server.getId() ).toOSString() );
         }
 



Mime
View raw message