You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/01/26 04:38:51 UTC

svn commit: r372421 - in /directory/trunks/apacheds/standalone: daemon/src/main/java/org/apache/directory/server/standalone/daemon/ installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ installers/plugin/src/main/java/org/a...

Author: akarasulu
Date: Wed Jan 25 19:38:45 2006
New Revision: 372421

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

 o fixed NPE when izpack target parameters were null (not set in config)
 o fixed issue with LICENSE.txt not being present: hmm gota use bundled one
   rather than doing a touch on it to have empty license.
 o fixed shell script template for stop command
 o removed infinte while loop in boostrapper init()


Modified:
    directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/template.init

Modified: directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java?rev=372421&r1=372420&r2=372421&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java (original)
+++ directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java Wed Jan 25 19:38:45 2006
@@ -246,20 +246,6 @@
         }
         
         callInit( bootstrapProperties.getProperty( BOOTSTRAP_START_CLASS_PROP, null ) );
-        
-        while( true )
-        {
-            try
-            {
-                Thread.sleep( 2000 );
-            }
-            catch ( InterruptedException e )
-            {
-                e.printStackTrace();
-            }
-
-            log.debug( "tick-tock" );
-        }
     }
     
     

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java?rev=372421&r1=372420&r2=372421&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java Wed Jan 25 19:38:45 2006
@@ -24,6 +24,8 @@
 import org.apache.directory.server.standalone.daemon.InstallationLayout;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Touch;
 import org.codehaus.plexus.util.FileUtils;
 
 
@@ -92,9 +94,9 @@
         }
         
         // copy over the license file if present otherwise use the bundled copy
+        File licenseTarget = layout.getLicenseFile( mymojo.getLicenseFile().getName() );
         if ( mymojo.getLicenseFile().exists() )
         {
-            File licenseTarget = layout.getLicenseFile( mymojo.getLicenseFile().getName() );
             try
             {
                 FileUtils.copyFile( mymojo.getLicenseFile(), licenseTarget );
@@ -104,6 +106,13 @@
                 throw new MojoFailureException( "Failed to copy license file " + mymojo.getLicenseFile()
                     + " into position " + licenseTarget );
             }
+        }
+        else
+        {
+            Touch task = new Touch();
+            task.setProject( new Project() );
+            task.setFile( licenseTarget );
+            task.execute();
         }
         
         // copy over the license file if present otherwise use the bundled copy

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java?rev=372421&r1=372420&r2=372421&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java Wed Jan 25 19:38:45 2006
@@ -105,7 +105,7 @@
         if ( target.getOsFamily().equals( "windows" ) )
         {
             // handle the installer file
-            if ( target.getIzPackInstallFile().exists() )
+            if ( target.getIzPackInstallFile() != null && target.getIzPackInstallFile().exists() )
             {
                 try
                 {
@@ -146,7 +146,7 @@
             }
 
             // handle the windows shortcuts file 
-            if ( target.getIzPackShortcutsWindowsFile().exists() )
+            if ( target.getIzPackShortcutsWindowsFile() != null && target.getIzPackShortcutsWindowsFile().exists() )
             {
                 try
                 {
@@ -201,7 +201,7 @@
         }
         else if ( target.getOsFamily().equals( "unix" ) || target.getOsFamily().equals( "mac" ) )
         {
-            if ( target.getIzPackInstallFile().exists() )
+            if ( target.getIzPackInstallFile() != null && target.getIzPackInstallFile().exists() )
             {
                 try
                 {
@@ -242,7 +242,7 @@
                 }
             }
 
-            if ( target.getIzPackShortcutsUnixFile().exists() )
+            if ( target.getIzPackShortcutsUnixFile() != null && target.getIzPackShortcutsUnixFile().exists() )
             {
                 try
                 {
@@ -296,7 +296,7 @@
             }
         }
 
-        if ( target.getIzPackUserInputFile().exists() )
+        if ( target.getIzPackUserInputFile() != null && target.getIzPackUserInputFile().exists() )
         {
             try
             {

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/template.init
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/template.init?rev=372421&r1=372420&r2=372421&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/template.init (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/template.init Wed Jan 25 19:38:45 2006
@@ -168,6 +168,7 @@
     # Stop ${app}
     #
     echo -n $"Shutting down $prog: "
+    RETVAL=0
 
     $DAEMON_HOME/${app} \
     -stop \