directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1507063 - in /directory/apacheds/trunk/installers-maven-plugin/src/main: java/org/apache/directory/server/installers/archive/ java/org/apache/directory/server/installers/macosxpkg/ resources/org/apache/directory/server/installers/archive/ ...
Date Thu, 25 Jul 2013 16:50:12 GMT
Author: pamarcelot
Date: Thu Jul 25 16:50:11 2013
New Revision: 1507063

URL: http://svn.apache.org/r1507063
Log:
Fix for DIRSERVER-1871 (Logging Not Working in M14).
And an improvement to the Mac OS X installer.

Added:
    directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/archive/log4j.properties
    directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/preflight
Modified:
    directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
    directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/macosxpkg/MacOsXPkgInstallerCommand.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/archive/ArchiveInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java?rev=1507063&r1=1507062&r2=1507063&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
(original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
Thu Jul 25 16:50:11 2013
@@ -23,6 +23,7 @@ package org.apache.directory.server.inst
 import java.io.File;
 import java.io.IOException;
 
+import org.apache.directory.server.core.api.InstanceLayout;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.installers.AbstractMojoCommand;
 import org.apache.directory.server.installers.GenerateMojo;
@@ -57,6 +58,31 @@ public class ArchiveInstallerCommand ext
         super( mojo, target );
         initializeFilterProperties();
     }
+    
+    /**
+     * {@inheritDoc}
+     */
+    protected void createInstanceLayout() throws IOException
+    {
+        // Getting the instance layout and creating directories
+        InstanceLayout instanceLayout = getInstanceLayout();
+        instanceLayout.mkdirs();
+
+        // Copying the log4j.properties file
+        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
+            getClass().getResourceAsStream( "/org/apache/directory/server/installers/archive/log4j.properties"
),
+            new File( instanceLayout.getConfDirectory(), "log4j.properties" ), true );
+
+        // Copying the wrapper configuration file
+        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
+            getClass().getResourceAsStream( "/org/apache/directory/server/installers/wrapper-instance.conf"
),
+            new File( instanceLayout.getConfDirectory(), "wrapper.conf" ), true );
+
+        // Copying ApacheDS LDIF configuration file
+        MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
+            getClass().getResourceAsStream( "/org/apache/directory/server/installers/config.ldif"
),
+            new File( instanceLayout.getConfDirectory(), "config.ldif" ), false );
+    }
 
 
     /**

Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/macosxpkg/MacOsXPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/macosxpkg/MacOsXPkgInstallerCommand.java?rev=1507063&r1=1507062&r2=1507063&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/macosxpkg/MacOsXPkgInstallerCommand.java
(original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/macosxpkg/MacOsXPkgInstallerCommand.java
Thu Jul 25 16:50:11 2013
@@ -211,6 +211,9 @@ public class MacOsXPkgInstallerCommand e
             MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "Info.plist"
), new File( targetDirectory,
                 "Info.plist" ) );
 
+            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "preflight" ),
new File(
+                pkgScriptsDirectory, "preflight" ) );
+
             MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "postflight"
), new File(
                 pkgScriptsDirectory, "postflight" ) );
         }
@@ -281,11 +284,15 @@ public class MacOsXPkgInstallerCommand e
             throw new MojoFailureException( "Failed to copy DMG resources files." );
         }
 
-        // Setting execution permission to the postflight script
+        // Setting execution permission to the preflight and postflight scripts
         // (unfortunately, the execution permission has been lost after the 
         // copy of the PKG to the dmg folder)
         MojoHelperUtils.exec( new String[]
             { "chmod", "755",
+                new File( dmgDirectory, "dmg/Apache Directory Server Installer.pkg/Contents/Resources/preflight"
)
+                    .toString() }, dmgDirectory, false );
+        MojoHelperUtils.exec( new String[]
+            { "chmod", "755",
                 new File( dmgDirectory, "dmg/Apache Directory Server Installer.pkg/Contents/Resources/postflight"
)
                     .toString() }, dmgDirectory, false );
 

Added: directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/archive/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/archive/log4j.properties?rev=1507063&view=auto
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/archive/log4j.properties
(added)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/archive/log4j.properties
Thu Jul 25 16:50:11 2013
@@ -0,0 +1,43 @@
+#############################################################################
+#    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.
+#############################################################################
+log4j.rootCategory=WARN, F, stdout
+
+log4j.appender.F=org.apache.log4j.RollingFileAppender
+log4j.appender.F.File=${apacheds.log.dir}/apacheds.log
+log4j.appender.F.MaxFileSize=100MB
+log4j.appender.F.MaxBackupIndex=3
+log4j.appender.F.layout=org.apache.log4j.PatternLayout
+log4j.appender.F.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+
+# Specific loggers (useful for debugging)
+#log4j.logger.jdbm.recman.BaseRecordManager=DEBUG
+#log4j.logger.org.apache.directory.server.OPERATION_LOG=DEBUG
+#log4j.logger.org.apache.directory.server.OPERATION_TIME=DEBUG
+#log4j.logger.org.apache.directory.api.CODEC_LOG=DEBUG
+#log4j.logger.org.apache.directory.server.ACI_LOG=DEBUG
+#log4j.logger.org.apache.directory.server.PROVIDER_LOG=DEBUG
+#log4j.logger.org.apache.directory.server.CONSUMER_LOG=DEBUG
+#log4j.logger.org.apache.directory.CURSOR_LOG=DEBUG
+#log4j.logger.org.apache.directory.api=DEBUG
+#log4j.logger.org.apache.directory.server=DEBUG
+#log4j.logger.net.sf.ehcache=DEBUG
+#log4j.logger.org.apache.mina=DEBUG
+

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=1507063&r1=1507062&r2=1507063&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
Thu Jul 25 16:50:11 2013
@@ -23,18 +23,8 @@
 chmod 644 /Library/LaunchDaemons/org.apache.directory.server.plist
 
 #
-# Launching the ApacheDS daemon
+# Loading the ApacheDS launch daemon
 #
-#RUNNING=`launchctl list | grep "org.apache.directory.server" | tail -1`
-# Testing if the ApacheDS 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
+launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
 
 

Added: directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/preflight
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/preflight?rev=1507063&view=auto
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/preflight
(added)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/macosxpkg/preflight
Thu Jul 25 16:50:11 2013
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#  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.
+#
+#
+
+#
+# Stopping and unloading the ApacheDS launch daemon
+#
+LOADED=`launchctl list | grep "org.apache.directory.server" | tail -1`
+if [ "X$LOADED" != "X" ]
+then
+    launchctl stop org.apache.directory.server
+    launchctl unload /Library/LaunchDaemons/org.apache.directory.server.plist
+fi
+
+



Mime
View raw message