directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1002239 - in /directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers: deb/DebInstallerCommand.java macosxpkg/MacOsXPkgInstallerCommand.java
Date Tue, 28 Sep 2010 16:21:55 GMT
Author: pamarcelot
Date: Tue Sep 28 16:21:54 2010
New Revision: 1002239

URL: http://svn.apache.org/viewvc?rev=1002239&view=rev
Log:
Added some checks in the targets on name of the currently running OS.

Modified:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java?rev=1002239&r1=1002238&r2=1002239&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
Tue Sep 28 16:21:54 2010
@@ -26,6 +26,7 @@ import java.io.IOException;
 import org.apache.directory.daemon.installers.AbstractMojoCommand;
 import org.apache.directory.daemon.installers.GenerateMojo;
 import org.apache.directory.daemon.installers.MojoHelperUtils;
+import org.apache.directory.daemon.installers.Target;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.tools.ant.taskdefs.Execute;
@@ -83,7 +84,8 @@ public class DebInstallerCommand extends
             // Copying the init script in /etc/init.d/
             File debEtcInitdDirectory = new File( getDebDirectory(), "etc/init.d" );
             debEtcInitdDirectory.mkdirs();
-            MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream(
"/org/apache/directory/daemon/installers/etc-initd-script" ),
+            MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
+                getClass().getResourceAsStream( "/org/apache/directory/daemon/installers/etc-initd-script"
),
                 new File( debEtcInitdDirectory, "apacheds-" + mojo.getProject().getVersion()
+ "-default" ), true );
         }
         catch ( Exception e )
@@ -172,6 +174,14 @@ public class DebInstallerCommand extends
             return false;
         }
 
+        // Verifying the currently used OS is Linux
+        if ( !Target.OS_NAME_LINUX.equalsIgnoreCase( System.getProperty( "os.name" ) ) )
+        {
+            log.warn( "Deb package installer can only be built on a machine running Linux!"
);
+            log.warn( "The build will continue, generation of this target is skipped." );
+            return false;
+        }
+
         // Verifying the dpkg utility exists
         if ( !target.getDpkgUtility().exists() )
         {

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java?rev=1002239&r1=1002238&r2=1002239&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
Tue Sep 28 16:21:54 2010
@@ -254,7 +254,15 @@ public class MacOsXPkgInstallerCommand e
         if ( !target.getOsName().equalsIgnoreCase( Target.OS_NAME_MAC_OS_X ) )
         {
             log.warn( "Mac OS X PKG installer can only be targeted for Mac OS X platform!"
);
-            log.warn( "The build will continue, but please check the the platform of this
installer target." );
+            log.warn( "The build will continue, but please check the platform of this installer
target." );
+            return false;
+        }
+
+        // Verifying the currently used OS is Mac OS X
+        if ( !Target.OS_NAME_MAC_OS_X.equalsIgnoreCase( System.getProperty( "os.name" ) )
)
+        {
+            log.warn( "Mac OS X PKG installer can only be built on a machine running Mac
OS X!" );
+            log.warn( "The build will continue, generation of this target is skipped." );
             return false;
         }
 



Mime
View raw message