You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2010/10/04 14:05:48 UTC
svn commit: r1004216 - in
/directory/apacheds/trunk/installers-maven-plugin/src/main:
java/org/apache/directory/server/installers/bin/
java/org/apache/directory/server/installers/deb/
java/org/apache/directory/server/installers/rpm/ resources/org/apach...
Author: pamarcelot
Date: Mon Oct 4 12:05:48 2010
New Revision: 1004216
URL: http://svn.apache.org/viewvc?rev=1004216&view=rev
Log:
o Added a check on the currently running OS when creating Bin, Deb and Rpm installers (it must be either Linux or Mac OS X to continue).
o Fixed the Bin installer with the inclusion of the config.ldif file.
o Commented the commands in the postflight script for the Mac OS X installer to not launch the server upon successful installation (it must be started by hand).
Modified:
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/bin/BinInstallerCommand.java
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/deb/DebInstallerCommand.java
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/rpm/RpmInstallerCommand.java
directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/postflight
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/bin/BinInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/bin/BinInstallerCommand.java?rev=1004216&r1=1004215&r2=1004216&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/bin/BinInstallerCommand.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/bin/BinInstallerCommand.java Mon Oct 4 12:05:48 2010
@@ -26,6 +26,7 @@ import java.io.IOException;
import org.apache.directory.server.installers.AbstractMojoCommand;
import org.apache.directory.server.installers.GenerateMojo;
import org.apache.directory.server.installers.MojoHelperUtils;
+import org.apache.directory.server.installers.Target;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.tools.ant.taskdefs.Execute;
@@ -99,6 +100,9 @@ public class BinInstallerCommand extends
MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
getClass().getResourceAsStream( "/org/apache/directory/server/installers/wrapper-instance.conf" ),
new File( instanceDirectory, "wrapper.conf" ), true );
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
+ getClass().getResourceAsStream( "/org/apache/directory/server/installers/config.ldif" ),
+ new File( instanceDirectory, "config.ldif" ), false );
// Copying the init script to the instance directory
MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
@@ -165,6 +169,15 @@ public class BinInstallerCommand extends
return false;
}
+ // Verifying the currently used OS to build the installer is Linux or Mac OS X
+ if ( !Target.OS_NAME_LINUX.equalsIgnoreCase( System.getProperty( "os.name" ) )
+ || !Target.OS_NAME_MAC_OS_X.equalsIgnoreCase( System.getProperty( "os.name" ) ) )
+ {
+ log.warn( "Bin package installer can only be built on a machine running Linux or Mac OS X!" );
+ log.warn( "The build will continue, generation of this target is skipped." );
+ return false;
+ }
+
// Verifying the sh utility exists
if ( !shUtility.exists() )
{
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/deb/DebInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/deb/DebInstallerCommand.java?rev=1004216&r1=1004215&r2=1004216&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/deb/DebInstallerCommand.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/deb/DebInstallerCommand.java Mon Oct 4 12:05:48 2010
@@ -174,10 +174,11 @@ public class DebInstallerCommand extends
return false;
}
- // Verifying the currently used OS is Linux
- if ( !Target.OS_NAME_LINUX.equalsIgnoreCase( System.getProperty( "os.name" ) ) )
+ // Verifying the currently used OS to build the installer is Linux or Mac OS X
+ if ( !Target.OS_NAME_LINUX.equalsIgnoreCase( System.getProperty( "os.name" ) )
+ || !Target.OS_NAME_MAC_OS_X.equalsIgnoreCase( System.getProperty( "os.name" ) ) )
{
- log.warn( "Deb package installer can only be built on a machine running Linux!" );
+ log.warn( "Deb package installer can only be built on a machine running Linux or Mac OS X!" );
log.warn( "The build will continue, generation of this target is skipped." );
return false;
}
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/rpm/RpmInstallerCommand.java?rev=1004216&r1=1004215&r2=1004216&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/rpm/RpmInstallerCommand.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/rpm/RpmInstallerCommand.java Mon Oct 4 12:05:48 2010
@@ -27,6 +27,7 @@ import java.util.Properties;
import org.apache.directory.server.installers.AbstractMojoCommand;
import org.apache.directory.server.installers.GenerateMojo;
import org.apache.directory.server.installers.MojoHelperUtils;
+import org.apache.directory.server.installers.Target;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.FileUtils;
@@ -178,6 +179,15 @@ public class RpmInstallerCommand extends
return false;
}
+ // Verifying the currently used OS to build the installer is Linux or Mac OS X
+ if ( !Target.OS_NAME_LINUX.equalsIgnoreCase( System.getProperty( "os.name" ) )
+ || !Target.OS_NAME_MAC_OS_X.equalsIgnoreCase( System.getProperty( "os.name" ) ) )
+ {
+ log.warn( "Rpm package installer can only be built on a machine running Linux or Mac OS X!" );
+ log.warn( "The build will continue, generation of this target is skipped." );
+ return false;
+ }
+
// Verifying the rpmbuild utility exists
if ( !target.getRpmBuild().exists() )
{
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/postflight
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/postflight?rev=1004216&r1=1004215&r2=1004216&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/postflight (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/postflight Mon Oct 4 12:05:48 2010
@@ -25,16 +25,16 @@ chmod 644 /Library/LaunchDaemons/org.apa
#
# Launching the Apache DS daemon
#
-RUNNING=`launchctl list | grep "org.apache.directory.server" | tail -1`
+#RUNNING=`launchctl list | grep "org.apache.directory.server" | tail -1`
# Testing if the Apache DS daemon is already running
-if [ "X$RUNNING" = "X" ]
-then
- # If it is not running, we load it
- launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
-else
- # If it is running, we unload it before reloading it
- launchctl unload /Library/LaunchDaemons/org.apache.directory.server.plist
- launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
-fi
+#if [ "X$RUNNING" = "X" ]
+#then
+# # If it is not running, we load it
+# launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
+#else
+# # If it is running, we unload it before reloading it
+# launchctl unload /Library/LaunchDaemons/org.apache.directory.server.plist
+# launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
+#fi