directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1344806 - in /directory/studio/trunk/plugins: ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ lda...
Date Thu, 31 May 2012 16:39:55 GMT
Author: pamarcelot
Date: Thu May 31 16:39:55 2012
New Revision: 1344806

URL: http://svn.apache.org/viewvc?rev=1344806&view=rev
Log:
Moved the ApacheDS dependency to the latest snapshot.
Added an extra verification for the server libraires before launching a server.

Modified:
    directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/ApacheDS157LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v200/pom.xml
    directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/ApacheDS200LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersUtils.java

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -93,9 +93,8 @@ public class ApacheDS153LdapServerAdapte
         Bundle bundle = ApacheDS153Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 1.5.3 libraries
-        monitor.subTask( "verifying and copying ApacheDS 1.5.3 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.3 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -163,6 +162,13 @@ public class ApacheDS153LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS153Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 1.5.3 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.3 libraries" );
+
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -95,9 +95,8 @@ public class ApacheDS154LdapServerAdapte
         Bundle bundle = ApacheDS154Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 1.5.4 libraries
-        monitor.subTask( "verifying and copying ApacheDS 1.5.4 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.4 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -165,6 +164,13 @@ public class ApacheDS154LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS154Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 1.5.4 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.4 libraries" );
+
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -94,9 +94,8 @@ public class ApacheDS155LdapServerAdapte
         Bundle bundle = ApacheDS155Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 1.5.5 libraries
-        monitor.subTask( "verifying and copying ApacheDS 1.5.5 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.5 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -164,6 +163,13 @@ public class ApacheDS155LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS155Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 1.5.5 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.5 libraries" );
+        
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -100,9 +100,8 @@ public class ApacheDS156LdapServerAdapte
         Bundle bundle = ApacheDS156Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 1.5.6 libraries
-        monitor.subTask( "verifying and copying ApacheDS 1.5.6 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.6 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -170,6 +169,13 @@ public class ApacheDS156LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS156Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 1.5.6 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.6 libraries" );
+
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/ApacheDS157LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/ApacheDS157LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/ApacheDS157LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v157/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v157/ApacheDS157LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -100,9 +100,8 @@ public class ApacheDS157LdapServerAdapte
         Bundle bundle = ApacheDS157Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 1.5.7 libraries
-        monitor.subTask( "verifying and copying ApacheDS 1.5.7 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.7 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -170,6 +169,13 @@ public class ApacheDS157LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS157Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 1.5.7 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
1.5.7 libraries" );
+
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v200/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v200/pom.xml?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v200/pom.xml (original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v200/pom.xml Thu May 31 16:39:55 2012
@@ -161,7 +161,7 @@
         <artifactId>maven-dependency-plugin</artifactId>
         <executions>
           <execution>
-	            <id>copy-apacheds-2.0.0-libraries</id>
+            <id>copy-apacheds-2.0.0-libraries</id>
             <phase>process-resources</phase>
             <goals>
               <goal>copy</goal>
@@ -172,7 +172,7 @@
                 <artifactItem>
                   <groupId>org.apache.directory.server</groupId>
                   <artifactId>apacheds-service</artifactId>
-                  <version>2.0.0-M7-SNAPSHOT</version>
+                  <version>2.0.0-M8-SNAPSHOT</version>
                 </artifactItem>
               </artifactItems>
             </configuration>

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/ApacheDS200LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/ApacheDS200LdapServerAdapter.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/ApacheDS200LdapServerAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v200/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v200/ApacheDS200LdapServerAdapter.java
Thu May 31 16:39:55 2012
@@ -82,7 +82,7 @@ public class ApacheDS200LdapServerAdapte
 
     /** The array of libraries names */
     private static final String[] libraries = new String[]
-        { "apacheds-service-2.0.0-M6.jar" }; //$NON-NLS-1$
+        { "apacheds-service-2.0.0-M8-SNAPSHOT.jar" }; //$NON-NLS-1$
 
 
     /**
@@ -94,9 +94,8 @@ public class ApacheDS200LdapServerAdapte
         Bundle bundle = ApacheDS200Plugin.getDefault().getBundle();
 
         // Verifying and copying ApacheDS 2.0.0 libraries
-        monitor.subTask( "verifying and copying ApacheDS 2.0.0 libraries" );
         LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
-            getServerLibrariesFolder(), libraries );
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
2.0.0 libraries" );
 
         // Creating server folder structure
         monitor.subTask( "creating server folder structure" );
@@ -164,6 +163,13 @@ public class ApacheDS200LdapServerAdapte
      */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
+        // Getting the bundle associated with the plugin
+        Bundle bundle = ApacheDS200Plugin.getDefault().getBundle();
+
+        // Verifying and copying ApacheDS 2.0.0 libraries
+        LdapServersUtils.verifyAndCopyLibraries( bundle, new Path( RESOURCES ).append( LIBS
),
+            getServerLibrariesFolder(), libraries, monitor, "verifying and copying ApacheDS
2.0.0 libraries" );
+        
         // Starting the console printer thread
         LdapServersUtils.startConsolePrinterThread( server );
 

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersUtils.java?rev=1344806&r1=1344805&r2=1344806&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersUtils.java
(original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersUtils.java
Thu May 31 16:39:55 2012
@@ -30,6 +30,7 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerStatus;
@@ -378,7 +379,7 @@ public class LdapServersUtils
      * @param libraries
      *      the names of the libraries
      */
-    public static void verifyAndCopyLibraries( Bundle bundle, IPath sourceLibrariesPath,
+    private static void verifyAndCopyLibraries( Bundle bundle, IPath sourceLibrariesPath,
         IPath destinationLibrariesPath, String[] libraries )
     {
         // Destination libraries folder
@@ -409,6 +410,32 @@ public class LdapServersUtils
 
 
     /**
+     * Verifies that the libraries folder exists and contains the jar files 
+     * needed to launch the server.
+     *
+     * @param bundle
+     *      the bundle
+     * @param sourceLibrariesPath
+     *      the path to the source libraries
+     * @param destinationLibrariesPath
+     *      the path to the destination libraries
+     * @param libraries
+     *      the names of the libraries
+     * @param monitor the monitor
+     * @param monitorTaskName the name of the task for the monitor
+     */
+    public static void verifyAndCopyLibraries( Bundle bundle, IPath sourceLibrariesPath,
+        IPath destinationLibrariesPath, String[] libraries, StudioProgressMonitor monitor,
String monitorTaskName )
+    {
+        // Creating the sub-task on the monitor
+        monitor.subTask( monitorTaskName );
+
+        // Verifying and copying the libraries
+        verifyAndCopyLibraries( bundle, sourceLibrariesPath, destinationLibrariesPath, libraries
);
+    }
+
+
+    /**
     * Copy the given resource.
     *
     * @param bundle



Mime
View raw message