directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r564116 - in /directory: apacheds/trunk/server-installers/ apacheds/trunk/server-installers/src/main/installers/ apacheds/trunk/server-main/ apacheds/trunk/server-main/src/main/java/org/apache/directory/server/ apacheds/trunk/server-tools/s...
Date Thu, 09 Aug 2007 06:44:21 GMT
Author: ccustine
Date: Wed Aug  8 23:44:19 2007
New Revision: 564116

URL: http://svn.apache.org/viewvc?view=rev&rev=564116
Log:
DIRSERVER-246, DIRSERVER-621, DIRSERVER-749, DIRSERVER-920, DIRSERVER-930, DIRSERVER-1015, DIRSERVER-1016

This changeset includes:
- Complete replacement of the Jsvc/Procrun daemon with Tanuki Wrapper
- Multi home data directories
- New native Windows installers based on NSIS
- New RPM installation

Modified:
    directory/apacheds/trunk/server-installers/pom.xml
    directory/apacheds/trunk/server-installers/src/main/installers/log4j.properties
    directory/apacheds/trunk/server-installers/src/main/installers/rpm-apacheds-tools.sh
    directory/apacheds/trunk/server-main/pom.xml
    directory/apacheds/trunk/server-main/src/main/java/org/apache/directory/server/Service.java
    directory/apacheds/trunk/server-tools/src/main/manifest/MANIFEST.MF
    directory/daemon/trunk/bootstrappers/pom.xml
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java
    directory/daemon/trunk/plugin/pom.xml
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java
    directory/daemon/trunk/pom.xml

Modified: directory/apacheds/trunk/server-installers/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-installers/pom.xml?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-installers/pom.xml (original)
+++ directory/apacheds/trunk/server-installers/pom.xml Wed Aug  8 23:44:19 2007
@@ -99,6 +99,30 @@
 
   <build>
     <plugins>
+<!--
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>process-resources</phase>
+            <configuration>
+              <tasks>
+                <mkdir dir="target/images"/>
+                <get src="http://builds.organicelement.com/repository/download/bt4/.lastSuccessful/ApacheDirectoryStudio_Windows.zip"
+                     verbose="on" usetimestamp="true"
+                     dest="target/ApacheDirectoryStudio.zip"
+                />
+                <touch file="target/ApacheDirectoryStudio.zip"/>
+                <unzip src="target/ApacheDirectoryStudio.zip" dest="target/images/win32" overwrite="false" />
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+-->
       <plugin>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-plugin</artifactId>
@@ -132,6 +156,7 @@
 
           <application>
             <name>apacheds</name>
+            <icon>src/main/resources/feather.ico</icon>
             <version>${pom.version}</version>
             <copyrightYear>2007</copyrightYear>
             <minimumJavaVersion>1.5</minimumJavaVersion>
@@ -152,7 +177,6 @@
               <author>trustin@apache.org</author>
             </authors>
           </application>
-
           <packagedFiles>
             <packagedFile>
               <source>org.apache.directory.server:apacheds-server-tools</source>
@@ -173,150 +197,128 @@
           </applicationClass>
 
           <rpmTargets>
-            <rpmTarget>
-              <packagedFiles>
-                <packagedFile>
-                  <source>rpm-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
-                  <filtered>true</filtered>
-                </packagedFile>
-              </packagedFiles>
-              <id>linux-jsvc-rpm</id>
-              <rpmSpecificationFile>src/main/installers/rpm-apacheds.spec</rpmSpecificationFile>
-              <finalName>
-                apacheds-${pom.version}-linux-i386.rpm
-              </finalName>
-              <osName>Linux</osName>
-              <osFamily>unix</osFamily>
-              <osArch>i386</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </rpmTarget>
+              <rpmTarget>
+                <packagedFiles>
+                  <packagedFile>
+                    <source>rpm-apacheds-tools.sh</source>
+                    <destinationPath>bin/apacheds-tools.sh</destinationPath>
+                    <installationBundleId>Binaries</installationBundleId>
+                    <executable>true</executable>
+                    <filtered>true</filtered>
+                  </packagedFile>
+                  <packagedFile>
+                    <source>apacheds-fhs.conf</source>
+                    <destinationPath>conf/apacheds.conf</destinationPath>
+                    <executable>false</executable>
+                    <filtered>true</filtered>
+                  </packagedFile>
+                  <packagedFile>
+                    <source>apacheds-sysconfig.conf</source>
+                    <destinationPath>conf/apacheds-sysconfig.conf</destinationPath>
+                    <executable>false</executable>
+                    <filtered>true</filtered>
+                  </packagedFile>
+                  <packagedFile>
+                    <source>apacheds-default.conf</source>
+                    <destinationPath>conf/apacheds-default.conf</destinationPath>
+                    <executable>false</executable>
+                    <filtered>false</filtered>
+                  </packagedFile>
+                  <packagedFile>
+                    <source>../resources/adstree.ico</source>
+                    <destinationPath>logo.ico</destinationPath>
+                    <executable>false</executable>
+                    <filtered>false</filtered>
+                  </packagedFile>
+                </packagedFiles>
+                <id>apacheds-rpm</id>
+                <rpmSpecificationFile>src/main/installers/apacheds-rpm.spec</rpmSpecificationFile>
+                <!--<rpmTopDir>${user.home}/rpmbuild</rpmTopDir>-->
+                <finalName>
+                  apacheds-server-${pom.version}-i386.rpm
+                </finalName>
+                <osName>Linux</osName>
+                <osFamily>unix</osFamily>
+                <osArch>i386</osArch>
+                <daemonFramework>tanuki</daemonFramework>
+                <scriptFile>../../daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/wrapper/src/sh.script.in</scriptFile>
+                <bootstrapperConfigurationFile>../../daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/wrapper/conf/apacheds.conf</bootstrapperConfigurationFile>
+              </rpmTarget>
           </rpmTargets>
 
-          <innoTargets>
-            <innoTarget>
-              <id>windows-xp-procrun</id>
-              <innoConfigurationFile>src/main/installers/inno-apacheds.iss</innoConfigurationFile>
-              <finalName>
-                apacheds-${pom.version}-win32-setup
-              </finalName>
-              <osName>Windows XP</osName>
-              <osFamily>windows</osFamily>
-              <osVersion>5.1</osVersion>
-              <osArch>x86</osArch>
-              <daemonFramework>procrun</daemonFramework>
-            </innoTarget>
-          </innoTargets>
-
-          <izPackTargets>
-            <izPackTarget>
+          <nsisTargets>
+            <nsisTarget>
               <packagedFiles>
                 <packagedFile>
-                  <source>izpack-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
+                  <source>apacheds.conf</source>
+                  <destinationPath>conf/apacheds.conf</destinationPath>
+                  <executable>false</executable>
                   <filtered>true</filtered>
                 </packagedFile>
-              </packagedFiles>
-              <id>linux-jsvc</id>
-              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
-              <finalName>
-                apacheds-${pom.version}-linux-i386-setup.jar
-              </finalName>
-              <osName>Linux</osName>
-              <osFamily>unix</osFamily>
-              <osArch>i386</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </izPackTarget>
-
-            <izPackTarget>
-              <packagedFiles>
                 <packagedFile>
-                  <source>izpack-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
+                  <source>apacheds-default.conf</source>
+                  <destinationPath>conf/apacheds-default.conf</destinationPath>
+                  <executable>false</executable>
                   <filtered>true</filtered>
                 </packagedFile>
+                <packagedFile>
+                  <source>../resources/adstree.ico</source>
+                  <destinationPath>server.ico</destinationPath>
+                  <executable>false</executable>
+                  <filtered>false</filtered>
+                </packagedFile>
               </packagedFiles>
-              <id>linux-jsvc-x86_64</id>
-              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
+
+              <id>win32</id>
+              <nsisCompiler>/usr/local/share/nsis/makensis</nsisCompiler>
+              <nsisConfigurationFile>src/main/installers/apacheds-server-win.nsi</nsisConfigurationFile>
               <finalName>
-                apacheds-${pom.version}-linux-x86_64-setup.jar
+                apacheds-server-${pom.version}-setup
               </finalName>
-              <osName>Linux</osName>
-              <osFamily>unix</osFamily>
-              <osArch>x86_64</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </izPackTarget>
+              <osName>Windows XP</osName>
+              <osFamily>windows</osFamily>
+              <osVersion>5.1</osVersion>
+              <osArch>x86</osArch>
+              <daemonFramework>tanuki</daemonFramework>
+            </nsisTarget>
 <!--
-            <izPackTarget>
+            <nsisTarget>
               <packagedFiles>
                 <packagedFile>
-                  <source>izpack-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
+                  <source>apacheds.conf</source>
+                  <destinationPath>conf/apacheds.conf</destinationPath>
+                  <executable>false</executable>
                   <filtered>true</filtered>
                 </packagedFile>
-              </packagedFiles>
-              <finalName>
-                apacheds-${pom.version}-solaris-sparc-setup.jar
-              </finalName>
-              <id>solaris-jsvc-sparc</id>
-              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
-              <osName>sunos</osName>
-              <osFamily>unix</osFamily>
-              <osArch>sparc</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </izPackTarget>
-
-            <izPackTarget>
-              <packagedFiles>
                 <packagedFile>
-                  <source>izpack-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
+                  <source>apacheds-default.conf</source>
+                  <destinationPath>conf/apacheds-default.conf</destinationPath>
+                  <executable>false</executable>
                   <filtered>true</filtered>
                 </packagedFile>
-              </packagedFiles>
-              <id>solaris-jsvc-i386</id>
-              <izPackInstallFile>src/main/installers/izpack-unix.xml</izPackInstallFile>
-              <finalName>
-                apacheds-${pom.version}-solaris-i386-setup.jar
-              </finalName>
-              <osName>sunos</osName>
-              <osFamily>unix</osFamily>
-              <osArch>i386</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </izPackTarget>
-
-            <izPackTarget>
-              <packagedFiles>
                 <packagedFile>
-                  <source>izpack-apacheds-tools.sh</source>
-                  <destinationPath>bin/apacheds-tools.sh</destinationPath>
-                  <installationBundleId>Binaries</installationBundleId>
-                  <executable>true</executable>
-                  <filtered>true</filtered>
+                  <source>../resources/adstree.ico</source>
+                  <destinationPath>server.ico</destinationPath>
+                  <executable>false</executable>
+                  <filtered>false</filtered>
                 </packagedFile>
               </packagedFiles>
-              <id>macosx-jsvc</id>
-              <izPackInstallFile>src/main/installers/izpack-mac.xml</izPackInstallFile>
+
+              <id>win32</id>
+              <nsisCompiler>/usr/local/share/nsis/makensis</nsisCompiler>
+              <nsisConfigurationFile>src/main/installers/apacheds-suite-win.nsi</nsisConfigurationFile>
               <finalName>
-                apacheds-${pom.version}-macosx-ppc-setup.jar
+                apacheds-suite-${pom.version}-setup
               </finalName>
-              <osName>macosx</osName>
-              <osFamily>unix</osFamily>
-              <osArch>ppc</osArch>
-              <daemonFramework>jsvc</daemonFramework>
-            </izPackTarget>
+              <osName>Windows XP</osName>
+              <osFamily>windows</osFamily>
+              <osVersion>5.1</osVersion>
+              <osArch>x86</osArch>
+              <daemonFramework>tanuki</daemonFramework>
+            </nsisTarget>
 -->
-          </izPackTargets>
+          </nsisTargets>
+
         </configuration>
         <executions>
           <execution>

Modified: directory/apacheds/trunk/server-installers/src/main/installers/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-installers/src/main/installers/log4j.properties?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-installers/src/main/installers/log4j.properties (original)
+++ directory/apacheds/trunk/server-installers/src/main/installers/log4j.properties Wed Aug  8 23:44:19 2007
@@ -1,10 +1,11 @@
-log4j.rootCategory=WARN, stdout, R
+log4j.rootCategory=WARN, R, stdout
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 
 log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=apacheds-rolling.log
+#log4j.appender.R.File=${apacheds.log.dir}/${apacheds.instance}/apacheds-rolling.log
+log4j.appender.R.File=${apacheds.log.dir}/apacheds-rolling.log
 
 log4j.appender.R.MaxFileSize=1024KB
 # Keep some backup files

Modified: directory/apacheds/trunk/server-installers/src/main/installers/rpm-apacheds-tools.sh
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-installers/src/main/installers/rpm-apacheds-tools.sh?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-installers/src/main/installers/rpm-apacheds-tools.sh (original)
+++ directory/apacheds/trunk/server-installers/src/main/installers/rpm-apacheds-tools.sh Wed Aug  8 23:44:19 2007
@@ -1,5 +1,6 @@
 #!/bin/sh
 # Really simple script to launch apacheds tools with RPM installer
 
-APACHEDS_HOME=/usr/local/${app}-${app.version}
+. /etc/sysconfig/apacheds
+
 $JAVA_HOME/bin/java -jar $APACHEDS_HOME/bin/apacheds-tools.jar $@

Modified: directory/apacheds/trunk/server-main/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-main/pom.xml?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-main/pom.xml (original)
+++ directory/apacheds/trunk/server-main/pom.xml Wed Aug  8 23:44:19 2007
@@ -6,6 +6,7 @@
     <artifactId>apacheds-parent</artifactId>
     <version>1.5.1-SNAPSHOT</version>
   </parent>
+  <groupId>org.apache.directory.server</groupId>  
   <artifactId>apacheds-server-main</artifactId>
   <name>ApacheDS Server Main</name>
   <packaging>jar</packaging>  

Modified: directory/apacheds/trunk/server-main/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-main/src/main/java/org/apache/directory/server/Service.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-main/src/main/java/org/apache/directory/server/Service.java (original)
+++ directory/apacheds/trunk/server-main/src/main/java/org/apache/directory/server/Service.java Wed Aug  8 23:44:19 2007
@@ -61,15 +61,16 @@
         printBanner();
         long startTime = System.currentTimeMillis();
 
-        if ( install != null )
-        {
-            log.info( "server: loading settings from ", install.getConfigurationFile() );
-            ApplicationContext factory = null;
-            factory = new FileSystemXmlApplicationContext( install.getConfigurationFile().toURL().toString() );
-            cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration" );
-            env = ( Properties ) factory.getBean( "environment" );
-        }
-        else if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes server.xml file argument
+//        if ( install != null )
+//        {
+//            log.info( "server: loading settings from ", install.getConfigurationFile() );
+//            ApplicationContext factory = null;
+//            factory = new FileSystemXmlApplicationContext( install.getConfigurationFile().toURL().toString() );
+//            cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration" );
+//            env = ( Properties ) factory.getBean( "environment" );
+//        }
+//        else if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes server.xml file argument
+        if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes server.xml file argument
         {
             log.info( "server: loading settings from ", args[0] );
             ApplicationContext factory = null;

Modified: directory/apacheds/trunk/server-tools/src/main/manifest/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/manifest/MANIFEST.MF?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/manifest/MANIFEST.MF (original)
+++ directory/apacheds/trunk/server-tools/src/main/manifest/MANIFEST.MF Wed Aug  8 23:44:19 2007
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Main-Class: org.apache.directory.server.tools.ApachedsTools
-Class-Path: logger.jar daemon.jar bootstrapper.jar 
+Class-Path: ../lib/logger.jar ../lib/daemon.jar ../lib/bootstrapper.jar 
  ../lib/antlr-2.7.6.jar 
  ../lib/apacheds-kerberos-shared-1.5.1-SNAPSHOT.jar 
  ../lib/apacheds-protocol-changepw-1.5.1-SNAPSHOT.jar 
@@ -21,8 +21,9 @@
  ../lib/apacheds-bootstrap-extract-1.5.1-SNAPSHOT.jar 
  ../lib/commons-collections-3.2.jar 
  ../lib/commons-lang-2.3.jar 
- ../lib/jcl104-over-slf4j-1.4.0.jar 
- ../lib/slf4j-api-1.4.0.jar 
+ ../lib/jcl104-over-slf4j-1.4.0.jar
+  ../lib/nlog4j-1.2.25.jar
+  ../lib/slf4j-api-1.4.0.jar 
  ../lib/commons-cli-1.0.jar 
  ../lib/jdbm-1.0.jar 
  ../lib/mina-core-1.0.3.jar 

Modified: directory/daemon/trunk/bootstrappers/pom.xml
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/pom.xml?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/bootstrappers/pom.xml (original)
+++ directory/daemon/trunk/bootstrappers/pom.xml Wed Aug  8 23:44:19 2007
@@ -38,6 +38,26 @@
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>install-library</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>install-file</goal>
+            </goals>
+            <configuration>
+              <groupId>org.tanukisoftware</groupId>
+              <artifactId>wrapper</artifactId>
+              <version>3.2.3</version>
+              <packaging>jar</packaging>
+              <file>../plugin/src/main/resources/org/apache/directory/daemon/installers/wrapper/lib/wrapper.jar</file>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java (original)
+++ directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java Wed Aug  8 23:44:19 2007
@@ -128,7 +128,7 @@
         Thread.currentThread().setContextClassLoader( application );
         try
         {
-            startClass = application.loadClass( startClassName );
+            startClass = application.loadClass( args[0] );
         }
         catch ( ClassNotFoundException e )
         {
@@ -148,7 +148,7 @@
 
         try
         {
-            start.init( this.layout, args );
+            start.init( this.layout, Bootstrapper.shift(args, 1));
         }
         catch ( Exception e )
         {
@@ -180,10 +180,11 @@
         Thread.currentThread().setContextClassLoader( application );
         Class clazz = null;
 
-        if ( startClassName.equals( stopClassName ) && start != null )
-        {
+//        if ( startClassName.equals( stopClassName ) && start != null )
+//        {
             clazz = startClass;
             stop = start;
+/*
         }
         else
         {
@@ -207,6 +208,7 @@
                 System.exit( ExitCodes.INSTANTIATION );
             }
         }
+*/
 
         try
         {

Modified: directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java (original)
+++ directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java Wed Aug  8 23:44:19 2007
@@ -40,6 +40,9 @@
 {
     private final static Logger log = LoggerFactory.getLogger( InstallationLayout.class );
     private final static FileFilter JAR_FILTER;
+    public static final String VAR_DIR = "apacheds.var.dir";
+    public static final String LOG_DIR = "apacheds.log.dir";
+    public static final String RUN_DIR = "apacheds.run.dir";
 
     static
     {
@@ -92,18 +95,39 @@
 
     public File getVarDirectory()
     {
+        String varDir = System.getProperty(VAR_DIR);
+
+        if ( varDir != null)
+        {
+            return new File( varDir );
+        }
+        
         return new File( baseDirectory, "var" );
     }
 
 
     public File getLogDirectory()
     {
+        String logDir = System.getProperty(LOG_DIR);
+
+        if ( logDir != null)
+        {
+            return new File( logDir );
+        }
+
         return new File( getVarDirectory(), "log" );
     }
 
 
     public File getRunDirectory()
     {
+        String runDir = System.getProperty(RUN_DIR);
+
+        if ( runDir != null)
+        {
+            return new File( runDir );
+        }
+
         return new File( getVarDirectory(), "run" );
     }
 
@@ -116,19 +140,19 @@
 
     public File getBootstrapper()
     {
-        return new File( getBinDirectory(), "bootstrapper.jar" );
+        return new File( getLibDirectory(), "bootstrapper.jar" );
     }
 
 
     public File getLogger()
     {
-        return new File( getBinDirectory(), "logger.jar" );
+        return new File( getLibDirectory(), "logger.jar" );
     }
 
 
     public File getDaemon()
     {
-        return new File( getBinDirectory(), "daemon.jar" );
+        return new File( getLibDirectory(), "wrapper.jar" );
     }
 
 
@@ -224,7 +248,7 @@
 
     public File getBootstrapperConfigurationFile()
     {
-        return new File( getConfigurationDirectory(), "bootstrapper.properties" );
+        return new File( getConfigurationDirectory(), "apacheds.conf" );
     }
 
 

Modified: directory/daemon/trunk/plugin/pom.xml
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/pom.xml?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/pom.xml (original)
+++ directory/daemon/trunk/plugin/pom.xml Wed Aug  8 23:44:19 2007
@@ -26,7 +26,7 @@
       <groupId>${pom.groupId}</groupId>
       <artifactId>daemon-bootstrappers</artifactId>
       <version>${pom.version}</version>
-    </dependency>  
+    </dependency>
 
     <dependency>
       <groupId>org.apache.maven</groupId>

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java Wed Aug  8 23:44:19 2007
@@ -183,7 +183,9 @@
         // copy over the REQUIRED daemon.jar file 
         try
         {
-            FileUtils.copyFile( mymojo.getDaemon().getFile(), layout.getDaemon() );
+            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "wrapper/lib/wrapper.jar" ),
+                    new File( layout.getLibDirectory(), "wrapper.jar" ) );
+
         }
         catch ( IOException e )
         {
@@ -192,9 +194,9 @@
         }
 
         // copy over the optional bootstrapper configuration file
-        if ( target.getBootstrapperConfiguraitonFile() == null || !target.getBootstrapperConfiguraitonFile().exists() )
+        if ( target.getBootstrapperConfigurationFile() == null || !target.getBootstrapperConfigurationFile().exists() )
         {
-            File dest = target.getBootstrapperConfiguraitonFile();
+            File dest = target.getBootstrapperConfigurationFile();
             try
             {
                 PrintWriter out = new PrintWriter( new FileWriter( dest ) );
@@ -206,7 +208,7 @@
             catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to copy project bootstrapper configuration file "
-                    + target.getBootstrapperConfiguraitonFile() + " into position "
+                    + target.getBootstrapperConfigurationFile() + " into position "
                     + layout.getBootstrapperConfigurationFile() );
             }
         }
@@ -214,13 +216,13 @@
         {
             try
             {
-                FileUtils.copyFile( target.getBootstrapperConfiguraitonFile(), layout
+                FileUtils.copyFile( target.getBootstrapperConfigurationFile(), layout
                     .getBootstrapperConfigurationFile() );
             }
             catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to copy project bootstrapper configuration file "
-                    + target.getBootstrapperConfiguraitonFile() + " into position "
+                    + target.getBootstrapperConfigurationFile() + " into position "
                     + layout.getBootstrapperConfigurationFile() );
             }
         }
@@ -254,23 +256,26 @@
         }
 
         // -------------------------------------------------------------------
-        // Copy OS Specific Files 
+        // Copy Wrapper Files
         // -------------------------------------------------------------------
 
-        // now copy over the jsvc executable renaming it to the applicationName 
-        if ( target.getOsName().equals( "linux" ) && target.getOsArch().equals( "i386" ) )
+        if ( target.getOsName().equals( "linux" ) && target.getOsArch().equals( "i386" ) && target.getDaemonFramework().equals("tanuki"))
         {
-            File executable = new File( layout.getBinDirectory(), target.getApplication().getName() );
             try
             {
-                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_linux_i386" ), executable );
+                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "wrapper/bin/wrapper-linux-x86-32" ),
+                        new File( layout.getBinDirectory(), target.getApplication().getName() ) );
+                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "wrapper/lib/libwrapper-linux-x86-32.so" ),
+                        new File( layout.getLibDirectory(), "libwrapper.so" ) );
+                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "wrapper/lib/wrapper.jar" ),
+                        new File( layout.getLibDirectory(), "wrapper.jar" ) );
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to copy jsvc executable file "
-                    + getClass().getResource( "jsvc_linux_i386" ) + " into position " + executable.getAbsolutePath() );
+                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib and bin directories");
             }
         }
+
 
         // now copy over the jsvc executable renaming it to the applicationName 
         if ( target.getOsName().equals( "linux" ) && target.getOsArch().equals( "x86_64" ) )

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java Wed Aug  8 23:44:19 2007
@@ -152,10 +152,10 @@
             {
                 rejects.add( key );
             }
-            else if ( artifact.equals( mymojo.getLogger() ) )
-            {
-                rejects.add( key );
-            }
+//            else if ( artifact.equals( mymojo.getLogger() ) )
+//            {
+//                rejects.add( key );
+//            }
             else
             {
                 if ( mymojo.getExcludes().contains( key ) )

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java Wed Aug  8 23:44:19 2007
@@ -33,6 +33,8 @@
 import org.apache.directory.daemon.installers.izpack.IzPackTarget;
 import org.apache.directory.daemon.installers.rpm.RpmInstallerCommand;
 import org.apache.directory.daemon.installers.rpm.RpmTarget;
+import org.apache.directory.daemon.installers.nsis.NsisTarget;
+import org.apache.directory.daemon.installers.nsis.NsisInstallerCommand;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Developer;
@@ -109,6 +111,11 @@
     /**
      * @parameter
      */
+    private NsisTarget[] nsisTargets;
+
+    /**
+     * @parameter
+     */
     private DebTarget[] debTargets;
 
     /**
@@ -231,6 +238,13 @@
                 innoCmd.execute();
             }
 
+            if ( target instanceof NsisTarget )
+            {
+                NsisInstallerCommand nsisCmd = null;
+                nsisCmd = new NsisInstallerCommand( this, ( NsisTarget ) target );
+                nsisCmd.execute();
+            }
+
             if ( target instanceof RpmTarget )
             {
                 RpmInstallerCommand rpmCmd = null;
@@ -246,6 +260,7 @@
         allTargets = new ArrayList();
         addAll( allTargets, izPackTargets );
         addAll( allTargets, innoTargets );
+        addAll( allTargets, nsisTargets );
         addAll( allTargets, rpmTargets );
         addAll( allTargets, debTargets );
         addAll( allTargets, pkgTargets );
@@ -389,9 +404,9 @@
                 target.setLoggerConfigurationFile( new File( sourceDirectory, "log4j.properties" ) );
             }
 
-            if ( target.getBootstrapperConfiguraitonFile() == null )
+            if ( target.getBootstrapperConfigurationFile() == null )
             {
-                target.setBootstrapperConfiguraitonFile( new File( sourceDirectory, "bootstrapper.properties" ) );
+                target.setBootstrapperConfigurationFile( new File( sourceDirectory, "bootstrapper.properties" ) );
             }
 
             if ( target.getServerConfigurationFile() == null )
@@ -512,8 +527,8 @@
                 getLog().info(
                     "loggerConfigurationFile: " + ( ( Target ) allTargets.get( ii ) ).getLoggerConfigurationFile() );
                 getLog().info(
-                    "bootstrapperConfiguraitonFiles: "
-                        + ( ( Target ) allTargets.get( ii ) ).getBootstrapperConfiguraitonFile() );
+                    "bootstrapperConfigurationFiles: "
+                        + ( ( Target ) allTargets.get( ii ) ).getBootstrapperConfigurationFile() );
                 getLog().info(
                     "serverConfigurationFil: " + ( ( Target ) allTargets.get( ii ) ).getServerConfigurationFile() );
 

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java Wed Aug  8 23:44:19 2007
@@ -57,7 +57,7 @@
     public final static String[] ARCHITECTURES = new String[]
         { "intel", "sparc", "ppc" };
     public final static String[] DAEMON_FRAMEWORKS = new String[]
-        { "jsvc", "procrun" };
+        { "jsvc", "procrun", "tanuki" };
 
     // required stuff
     private String id;
@@ -71,7 +71,7 @@
     private String copyrightYear = "2006";
     private File loggerConfigurationFile;
     private File serverConfigurationFile;
-    private File bootstrapperConfiguraitonFile;
+    private File bootstrapperConfigurationFile;
     private File sourcesDirectory;
     private File docsDirectory;
     private String sourcesTargetPath;
@@ -186,15 +186,15 @@
     }
 
 
-    public void setBootstrapperConfiguraitonFile( File bootstrapperConfiguraitonFile )
+    public void setBootstrapperConfigurationFile( File bootstrapperConfigurationFile )
     {
-        this.bootstrapperConfiguraitonFile = bootstrapperConfiguraitonFile;
+        this.bootstrapperConfigurationFile = bootstrapperConfigurationFile;
     }
 
 
-    public File getBootstrapperConfiguraitonFile()
+    public File getBootstrapperConfigurationFile()
     {
-        return bootstrapperConfiguraitonFile;
+        return bootstrapperConfigurationFile;
     }
 
 

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java Wed Aug  8 23:44:19 2007
@@ -192,12 +192,12 @@
             {
                 try
                 {
-                    MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "../prunsrv.exe" ), executableTarget );
+                    MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "../wrapper/bin/wrapper-windows-x86-32.exe" ), executableTarget );
                 }
                 catch ( IOException e )
                 {
                     throw new MojoFailureException( "Failed to copy prunsrv executable file "
-                        + getClass().getResource( "../prunsrv.exe" ) + " into position " + executableTarget.getAbsolutePath() );
+                        + getClass().getResource( "../wrapper/bin/wrapper-windows-x86-32.exe" ) + " into position " + executableTarget.getAbsolutePath() );
                 }
             }
             
@@ -206,9 +206,10 @@
             // Handle the manager process: prunmgr.exe 
             // ---------------------------------------------------------------
 
-            executableTarget = new File( target.getLayout().getBinDirectory(), 
+/*
+            executableTarget = new File( target.getLayout().getBinDirectory(),
                 target.getApplication().getName() + "w.exe" );
-            override = new File( mymojo.getSourceDirectory(), target.getPrunmgrExecutablePath() );
+            override = new File( mymojo.getSourceDirectory(), target.getWrapperExecutablePath() );
             if ( override.exists() )
             {
                 mymojo.getLog().info( "Using procrun prunmgr.exe supplied by project: " + override.getAbsolutePath() );
@@ -234,6 +235,7 @@
                         + getClass().getResource( "../prunmgr.exe" ) + " into position " + executableTarget.getAbsolutePath() );
                 }
             }
+*/
         }
 
         processPackagedFiles( target, target.getPackagedFiles() );

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java Wed Aug  8 23:44:19 2007
@@ -34,7 +34,7 @@
  */
 public class InnoTarget extends Target
 {
-    private String prunmgrExecutablePath = "src\\main\\installers\\prunmgr.exe";
+    private String prunmgrExecutablePath = "src\\main\\installers\\wrapper\\bin\\wrapper-windows-x86-32.exe";
     private String prunsrvExecutablePath = "src\\main\\installers\\prunsrv.exe";
     private File innoCompiler = new File( "C:\\Program Files\\Inno Setup 5\\ISCC.exe" );
     private File innoConfigurationFile;

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java Wed Aug  8 23:44:19 2007
@@ -110,13 +110,28 @@
             return;
         }
 
-        if ( !System.getProperties().getProperty( "user.name" ).equals( "root" ) && !target.isDoSudo() )
+        if ( target.getRpmTopDir() == null )
         {
-            log.warn( "RPM target " + target.getId() + " can only be built by a super user or regular user "
-                + "with sudo capabilities that bypass the password!" );
-            log.warn( "The target will not be built." );
-            log.warn( "The rest of the build will not fail because of this acceptable situation." );
-            return;
+            target.setRpmTopDir( new File( System.getProperty( "user.home" ) + "/rpmbuild" ) );
+        }
+
+        if ( !target.getRpmTopDir().exists() )
+        {
+            try
+            {
+                target.getRpmTopDir().mkdirs();
+                String baseDir = target.getRpmTopDir().getAbsolutePath();
+                new File( baseDir + "/BUILD" ).mkdirs();
+                new File( baseDir + "/RPMS" ).mkdirs();
+                new File( baseDir + "/SOURCES" ).mkdirs();
+                new File( baseDir + "/SPECS" ).mkdirs();
+                new File( baseDir + "/SRPMS" ).mkdirs();
+            } catch ( Exception e )
+            {
+                log.warn( "Please set the rpmTopDir in the pom.xml to a directory where the build" );
+                log.warn( "user has proper permissions to create dirs and files." );
+                return;
+            }
         }
 
         // @todo this should really be a parameter taken from the user's settings
@@ -191,7 +206,7 @@
             {
                 MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectRpmFile, rpmConfigurationFile, true );
             }
-            catch ( IOException e )
+           catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to filter and copy project provided " + projectRpmFile + " to "
                     + rpmConfigurationFile );
@@ -216,10 +231,10 @@
 
         buildSourceTarball();
         String[] cmd = new String[]
-            { rpmBuilder.getAbsolutePath(), "-ba", rpmConfigurationFile.getAbsolutePath() };
+            { rpmBuilder.getAbsolutePath(), "-ba", "--define", "_topdir " + target.getRpmTopDir().getAbsolutePath(), rpmConfigurationFile.getAbsolutePath() };
         MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );
         String rpmName = target.getApplication().getName() + "-" + version + "-0.i386.rpm";
-        File srcFile = new File( "/usr/src/redhat/RPMS/i386", rpmName );
+        File srcFile = new File( System.getProperty("user.home") + "/rpmbuild/RPMS/i386", rpmName );
         File dstFile = null;
 
         if ( target.getFinalName() == null )
@@ -240,6 +255,7 @@
         try
         {
             FileUtils.copyFile( srcFile, dstFile );
+            srcFile.delete();
         }
         catch ( IOException e )
         {
@@ -255,6 +271,7 @@
         filterProperties.put( "app", target.getApplication().getName() );
         filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase() );
         filterProperties.put( "app.server.class", mymojo.getApplicationClass() );
+        filterProperties.put( "app.java.home", "java");
 
         char firstChar = target.getApplication().getName().charAt( 0 );
         firstChar = Character.toUpperCase( firstChar );
@@ -319,7 +336,7 @@
         filterProperties.put( "verify.append.libs", getVerifyLibraryJars() );
         filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent() );
         filterProperties.put( "server.init", target.getLayout().getInitScript().getName() );
-        filterProperties.put( "app.install.base", "/usr/local/" + target.getApplication().getName() + "-" + version );
+        filterProperties.put( "app.install.base", "/opt/" + target.getApplication().getName() + "-" + version );
 
         if ( target.getDocsDirectory() != null )
         {
@@ -357,8 +374,8 @@
         if ( noticeFile.exists() )
         {
             filterProperties.put( "install.notice.file", "install -m 644 " + target.getLayout().getBaseDirectory()
-                + "/NOTICE.txt $RPM_BUILD_ROOT/usr/local/" + target.getApplication().getName() + "-%{version}" );
-            filterProperties.put( "verify.notice.file", "/usr/local/" + target.getApplication().getName()
+                + "/NOTICE.txt $RPM_BUILD_ROOT/opt/" + target.getApplication().getName() + "-%{version}" );
+            filterProperties.put( "verify.notice.file", "/opt/" + target.getApplication().getName()
                 + "-%{version}/NOTICE.txt" );
         }
         else
@@ -386,7 +403,7 @@
             }
 
             String path = file.getAbsolutePath().substring( basePathSize );
-            buf.append( "mkdir -p $RPM_BUILD_ROOT/usr/local/" );
+            buf.append( "mkdir -p $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -413,7 +430,7 @@
             }
 
             String path = file.getAbsolutePath().substring( basePathSize );
-            buf.append( "mkdir -p $RPM_BUILD_ROOT/usr/local/" );
+            buf.append( "mkdir -p $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -464,7 +481,7 @@
             buf.append( "install -m 644 " );
             buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
             buf.append( path );
-            buf.append( " $RPM_BUILD_ROOT/usr/local/" );
+            buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -486,7 +503,7 @@
         {
             File file = ( File ) docList.get( ii );
             String path = file.getAbsolutePath().substring( basePathSize );
-            buf.append( "/usr/local/" );
+            buf.append( target.getLayout().getBaseDirectory() );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -516,7 +533,7 @@
             buf.append( "install -m 644 " );
             buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
             buf.append( path );
-            buf.append( " $RPM_BUILD_ROOT/usr/local/" );
+            buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -538,7 +555,7 @@
         {
             File file = ( File ) sourceList.get( ii );
             String path = file.getAbsolutePath().substring( basePathSize );
-            buf.append( "/usr/local/" );
+            buf.append( "/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -555,7 +572,7 @@
         for ( int ii = 0; ii < artifacts.size(); ii++ )
         {
             File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
-            buf.append( "/usr/local/" );
+            buf.append( "/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/lib/" );
             buf.append( artifact.getName() );
@@ -575,7 +592,7 @@
             buf.append( "install -m 644 " );
             File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
             buf.append( artifact.getAbsoluteFile() );
-            buf.append( " $RPM_BUILD_ROOT/usr/local/" );
+            buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/lib/" );
             buf.append( artifact.getName() );
@@ -612,7 +629,7 @@
 
         String[] cmd = new String[]
             { "tar", "-zcvf",
-                "/usr/src/redhat/SOURCES/" + target.getApplication().getName() + "-" + version + ".tar.gz",
+                System.getProperty("user.home") + "/rpmbuild/SOURCES/" + target.getApplication().getName() + "-" + version + ".tar.gz",
                 sourcesDir.getAbsolutePath() };
 
         MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java (original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java Wed Aug  8 23:44:19 2007
@@ -35,6 +35,7 @@
 {
     private File rpmBuilder = new File( "/usr/bin/rpmbuild" );
     private File rpmSpecificationFile;
+    private File rpmTopDir;
     private boolean doSudo = false;
 
 
@@ -71,5 +72,15 @@
     public boolean isDoSudo()
     {
         return doSudo;
+    }
+
+    public File getRpmTopDir()
+    {
+        return rpmTopDir;
+    }
+
+    public void setRpmTopDir(File rpmTopDir)
+    {
+        this.rpmTopDir = rpmTopDir;
     }
 }

Modified: directory/daemon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/pom.xml?view=diff&rev=564116&r1=564115&r2=564116
==============================================================================
--- directory/daemon/trunk/pom.xml (original)
+++ directory/daemon/trunk/pom.xml Wed Aug  8 23:44:19 2007
@@ -51,6 +51,13 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+        <groupId>org.tanukisoftware</groupId>
+        <artifactId>wrapper</artifactId>
+        <version>3.2.3</version>
+    </dependency>
+
+
   </dependencies>
 
   <scm>
@@ -78,6 +85,13 @@
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.0.2</version>
         </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+
       </plugins>
     </pluginManagement>
  



Mime
View raw message