directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r998095 - in /directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin: ./ src/main/java/org/apache/directory/daemon/installers/ src/main/java/org/apache/directory/daemon/installers/archive/ src/main/java/org/apache/directory/dae...
Date Fri, 17 Sep 2010 12:30:31 GMT
Author: pamarcelot
Date: Fri Sep 17 12:30:31 2010
New Revision: 998095

URL: http://svn.apache.org/viewvc?rev=998095&view=rev
Log:
Fixed dependencies. Removed useles targets like Inno or Izpack. Commented stuff that was referring to the old InstallationLayout.

Removed:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/
Modified:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/pom.xml
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
    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
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/pom.xml?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/pom.xml (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/pom.xml Fri Sep 17 12:30:31 2010
@@ -22,47 +22,46 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.apache.directory.daemon</groupId>
-    <artifactId>daemon-parent</artifactId>
-    <version>1.1.9-SNAPSHOT</version>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>apacheds-parent</artifactId>
+    <version>1.5.8-SNAPSHOT</version>
   </parent>
-  <artifactId>daemon-plugin</artifactId>
-  <name>Apache Directory Daemon Plugin (Maven 2)</name>
+  <artifactId>installers-plugin</artifactId>
+  <name>ApacheDS Installers Maven Plugin</name>
   <packaging>maven-plugin</packaging>
 
   <description>
-    A plugin that builds installers using bootstrappers and commons-daemon procrun and jsvc
+    A plugin that builds ApacheDS installers
   </description>
 
   <dependencies>
     <dependency>
-      <artifactId>daemon-bootstrappers</artifactId>
-      <groupId>${project.groupId}</groupId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0.9</version>
+      <version>2.2.1</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-project</artifactId>
-      <version>2.0.9</version>
+      <version>2.2.1</version>
     </dependency>
 
     <dependency>
-      <groupId>plexus</groupId>
+      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.0.3</version>
+      <version>2.0.5</version>
     </dependency>
-
+    
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.8.1</version>
+    </dependency>
+    
     <dependency>
-      <groupId>izpack</groupId>
-      <artifactId>standalone-compiler</artifactId>
-      <version>3.8.0</version>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>apacheds-service</artifactId>
     </dependency>
   </dependencies>
 

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java Fri Sep 17 12:30:31 2010
@@ -24,7 +24,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Properties;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.server.InstallationLayout;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.codehaus.plexus.util.FileUtils;
@@ -84,154 +84,155 @@ public class CreateImageCommand extends 
         target.setLayout( layout );
         layout.mkdirs();
 
-        // copy over the read me file if present otherwise use the bundled copy
-        if ( target.getApplication().getReadme() != null && target.getApplication().getReadme().exists() )
-        {
-            File readmeTarget = layout.getReadmeFile( target.getApplication().getReadme().getName() );
-            try
-            {
-                FileUtils.copyFile( target.getApplication().getReadme(), readmeTarget );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy read me file " + target.getApplication().getReadme()
-                    + " into position " + readmeTarget );
-            }
-        }
-
-        // copy over the license file if present otherwise use the bundled copy
-        File licenseTarget = layout.getLicenseFile( target.getApplication().getLicense().getName() );
-        if ( target.getApplication().getLicense().exists() )
-        {
-            try
-            {
-                FileUtils.copyFile( target.getApplication().getLicense(), licenseTarget );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy license file " + target.getApplication().getLicense()
-                    + " into position " + licenseTarget );
-            }
-        }
-        else
-        {
-            try
-            {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "LICENSE" ),
-                    licenseTarget, false );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to bundled ASL license file "
-                    + getClass().getResource( "LICENSE" ) + " into position " + licenseTarget );
-            }
-        }
-
-        // copy over the icon if present otherwise use the bundled copy
-        File iconTarget = layout.getLogoIconFile( target.getApplication().getIcon().getName() );
-        if ( target.getApplication().getIcon().exists() )
-        {
-            try
-            {
-                FileUtils.copyFile( target.getApplication().getIcon(), iconTarget );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy icon file " + target.getApplication().getIcon()
-                    + " into position " + iconTarget );
-            }
-        }
-        else
-        {
-            try
-            {
-                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "logo.ico" ), iconTarget );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy icon file " + getClass().getResource( "logo.ico" )
-                    + " into position " + iconTarget );
-            }
-        }
-
-        // copy over the REQUIRED bootstrapper.jar file 
-        try
-        {
-            FileUtils.copyFile( mymojo.getBootstrapper().getFile(), layout.getBootstrapper() );
-        }
-        catch ( IOException e )
-        {
-            throw new MojoFailureException( "Failed to copy bootstrapper.jar " + mymojo.getBootstrapper().getFile()
-                + " into position " + layout.getBootstrapper() );
-        }
-
-        // copy over the REQUIRED logger artifact
-        /*
-                try
-                {
-                    FileUtils.copyFile( mymojo.getLogger().getFile(), layout.getLogger() );
-                }
-                catch ( IOException e )
-                {
-                    throw new MojoFailureException( "Failed to copy logger.jar " + mymojo.getLogger().getFile()
-                        + " into position " + layout.getLogger() );
-                }
-        */
-
-        // copy over the REQUIRED daemon.jar file 
-        try
-        {
-            FileUtils.copyFile( mymojo.getDaemon().getFile(), new File( layout.getLibDirectory(), "wrapper.jar" ) );
-        }
-        catch ( IOException e )
-        {
-            throw new MojoFailureException( "Failed to copy daemon.jar " + mymojo.getDaemon().getFile()
-                + " into position " + layout.getDaemon() );
-        }
-
-        // copy over the optional bootstrapper configuration file
-        if ( target.getBootstrapperConfigurationFile() != null )
-        {
-            try
-            {
-                FileUtils.copyFile( target.getBootstrapperConfigurationFile(), layout
-                    .getBootstrapperConfigurationFile() );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy project bootstrapper configuration file "
-                    + target.getBootstrapperConfigurationFile() + " into position "
-                    + layout.getBootstrapperConfigurationFile() );
-            }
-        }
-
-        // copy over the optional logging configuration file
-        if ( target.getLoggerConfigurationFile().exists() )
-        {
-            try
-            {
-                FileUtils.copyFile( target.getLoggerConfigurationFile(), layout.getLoggerConfigurationFile() );
-            }
-            catch ( IOException e )
-            {
-                log.error( "Failed to copy logger configuration file " + target.getLoggerConfigurationFile()
-                    + " into position " + layout.getLoggerConfigurationFile(), e );
-            }
-        }
-
-        // copy over the optional server configuration file
-        if ( target.getServerConfigurationFile().exists() )
-        {
-            try
-            {
-                FileUtils.copyFile( target.getServerConfigurationFile(), layout.getConfigurationFile() );
-            }
-            catch ( IOException e )
-            {
-                log.error( "Failed to copy server configuration file " + target.getServerConfigurationFile()
-                    + " into position " + layout.getConfigurationFile(), e );
-            }
-        }
+        // TODO FIXME
+        //        // copy over the read me file if present otherwise use the bundled copy
+        //        if ( target.getApplication().getReadme() != null && target.getApplication().getReadme().exists() )
+        //        {
+        //            File readmeTarget = layout.getReadmeFile( target.getApplication().getReadme().getName() );
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getApplication().getReadme(), readmeTarget );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to copy read me file " + target.getApplication().getReadme()
+        //                    + " into position " + readmeTarget );
+        //            }
+        //        }
+        //
+        //        // copy over the license file if present otherwise use the bundled copy
+        //        File licenseTarget = layout.getLicenseFile( target.getApplication().getLicense().getName() );
+        //        if ( target.getApplication().getLicense().exists() )
+        //        {
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getApplication().getLicense(), licenseTarget );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to copy license file " + target.getApplication().getLicense()
+        //                    + " into position " + licenseTarget );
+        //            }
+        //        }
+        //        else
+        //        {
+        //            try
+        //            {
+        //                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "LICENSE" ),
+        //                    licenseTarget, false );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to bundled ASL license file "
+        //                    + getClass().getResource( "LICENSE" ) + " into position " + licenseTarget );
+        //            }
+        //        }
+        //
+        //        // copy over the icon if present otherwise use the bundled copy
+        //        File iconTarget = layout.getLogoIconFile( target.getApplication().getIcon().getName() );
+        //        if ( target.getApplication().getIcon().exists() )
+        //        {
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getApplication().getIcon(), iconTarget );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to copy icon file " + target.getApplication().getIcon()
+        //                    + " into position " + iconTarget );
+        //            }
+        //        }
+        //        else
+        //        {
+        //            try
+        //            {
+        //                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "logo.ico" ), iconTarget );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to copy icon file " + getClass().getResource( "logo.ico" )
+        //                    + " into position " + iconTarget );
+        //            }
+        //        }
+        //
+        //        // copy over the REQUIRED bootstrapper.jar file 
+        //        try
+        //        {
+        //            FileUtils.copyFile( mymojo.getBootstrapper().getFile(), layout.getBootstrapper() );
+        //        }
+        //        catch ( IOException e )
+        //        {
+        //            throw new MojoFailureException( "Failed to copy bootstrapper.jar " + mymojo.getBootstrapper().getFile()
+        //                + " into position " + layout.getBootstrapper() );
+        //        }
+        //
+        //        // copy over the REQUIRED logger artifact
+        //        /*
+        //                try
+        //                {
+        //                    FileUtils.copyFile( mymojo.getLogger().getFile(), layout.getLogger() );
+        //                }
+        //                catch ( IOException e )
+        //                {
+        //                    throw new MojoFailureException( "Failed to copy logger.jar " + mymojo.getLogger().getFile()
+        //                        + " into position " + layout.getLogger() );
+        //                }
+        //        */
+        //
+        //        // copy over the REQUIRED daemon.jar file 
+        //        try
+        //        {
+        //            FileUtils.copyFile( mymojo.getDaemon().getFile(), new File( layout.getLibDirectory(), "wrapper.jar" ) );
+        //        }
+        //        catch ( IOException e )
+        //        {
+        //            throw new MojoFailureException( "Failed to copy daemon.jar " + mymojo.getDaemon().getFile()
+        //                + " into position " + layout.getDaemon() );
+        //        }
+        //
+        //        // copy over the optional bootstrapper configuration file
+        //        if ( target.getBootstrapperConfigurationFile() != null )
+        //        {
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getBootstrapperConfigurationFile(), layout
+        //                    .getBootstrapperConfigurationFile() );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                throw new MojoFailureException( "Failed to copy project bootstrapper configuration file "
+        //                    + target.getBootstrapperConfigurationFile() + " into position "
+        //                    + layout.getBootstrapperConfigurationFile() );
+        //            }
+        //        }
+        //
+        //        // copy over the optional logging configuration file
+        //        if ( target.getLoggerConfigurationFile().exists() )
+        //        {
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getLoggerConfigurationFile(), layout.getLoggerConfigurationFile() );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                log.error( "Failed to copy logger configuration file " + target.getLoggerConfigurationFile()
+        //                    + " into position " + layout.getLoggerConfigurationFile(), e );
+        //            }
+        //        }
+        //
+        //        // copy over the optional server configuration file
+        //        if ( target.getServerConfigurationFile().exists() )
+        //        {
+        //            try
+        //            {
+        //                FileUtils.copyFile( target.getServerConfigurationFile(), layout.getConfigurationFile() );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                log.error( "Failed to copy server configuration file " + target.getServerConfigurationFile()
+        //                    + " into position " + layout.getConfigurationFile(), e );
+        //            }
+        //        }
 
         // -------------------------------------------------------------------
         // Copy Wrapper Files
@@ -378,7 +379,7 @@ public class CreateImageCommand extends 
 
         if ( target.getSourcesDirectory() != null )
         {
-            File sourcesDirectory = new File( layout.getBaseDirectory(), target.getSourcesTargetPath() );
+            File sourcesDirectory = new File( layout.getInstallationDirectory(), target.getSourcesTargetPath() );
             try
             {
                 FileUtils.copyDirectoryStructure( target.getSourcesDirectory(), sourcesDirectory );
@@ -394,7 +395,7 @@ public class CreateImageCommand extends 
 
         if ( target.getDocsDirectory() != null )
         {
-            File docsDirectory = new File( layout.getBaseDirectory(), target.getDocsTargetPath() );
+            File docsDirectory = new File( layout.getInstallationDirectory(), target.getDocsTargetPath() );
             try
             {
                 FileUtils.copyDirectoryStructure( target.getDocsDirectory(), docsDirectory );
@@ -408,7 +409,7 @@ public class CreateImageCommand extends 
 
         // -- if present copy the NOTICE.txt file --
 
-        File noticeFileTarget = new File( layout.getBaseDirectory(), "NOTICE.txt" );
+        File noticeFileTarget = new File( layout.getInstallationDirectory(), "NOTICE.txt" );
         File noticeFile = new File( "NOTICE.txt" );
         if ( noticeFile.exists() )
         {

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java Fri Sep 17 12:30:31 2010
@@ -45,60 +45,63 @@ public abstract class MojoCommand
     protected final Map<String, Artifact> dependencyMap;
     protected final Log log;
     protected final ServiceInstallersMojo mymojo;
-    
+
+
     public abstract void execute() throws MojoExecutionException, MojoFailureException;
+
+
     public abstract Properties getFilterProperties();
-    
+
 
     public MojoCommand( ServiceInstallersMojo mymojo )
     {
         this.mymojo = mymojo;
         this.log = mymojo.getLog();
         this.dependencyMap = new HashMap<String, Artifact>();
-        
-        for ( Iterator ii = mymojo.getProject().getDependencyArtifacts().iterator(); ii.hasNext(); /* */ )
+
+        for ( Iterator ii = mymojo.getProject().getDependencyArtifacts().iterator(); ii.hasNext(); /* */)
         {
             Artifact artifact = ( Artifact ) ii.next();
             dependencyMap.put( artifact.getGroupId() + ":" + artifact.getArtifactId(), artifact );
         }
     }
-    
-    
+
+
     public void reportProcessing( PackagedFile packagedFile )
     {
-        if ( ! log.isInfoEnabled() )
+        if ( !log.isInfoEnabled() )
         {
             return;
         }
-        
-        log.info( "\t\tProcessing packagedFile with source " + packagedFile.getSource() + " for destination " 
-            + packagedFile.getDestinationPath() ); 
+
+        log.info( "\t\tProcessing packagedFile with source " + packagedFile.getSource() + " for destination "
+            + packagedFile.getDestinationPath() );
     }
-    
-    
+
+
     public void processPackagedFiles( Target target, PackagedFile[] packagedFiles )
     {
         if ( packagedFiles == null )
         {
             return;
         }
-        
+
         if ( log.isInfoEnabled() )
         {
             log.info( "\tProcessing " + packagedFiles.length + " packagedFiles: " );
         }
-        
+
         for ( int ii = 0; ii < packagedFiles.length; ii++ )
         {
             File source = null;
-            reportProcessing( packagedFiles[ii ] );
+            reportProcessing( packagedFiles[ii] );
 
             try
             {
                 if ( packagedFiles[ii].isDependency() )
                 {
                     Artifact artifact = dependencyMap.get( packagedFiles[ii].getSource() );
-                    
+
                     if ( artifact == null )
                     {
                         throw new MojoFailureException( "The packaged file setup as a dependency on artifact "
@@ -111,8 +114,8 @@ public abstract class MojoCommand
                 {
                     source = new File( packagedFiles[ii].getSource() );
                 }
-                
-                if ( ! source.isAbsolute() )
+
+                if ( !source.isAbsolute() )
                 {
                     File sourceDirectoryRelative = new File( mymojo.getSourceDirectory(), packagedFiles[ii].getSource() );
                     File baseRelative = new File( mymojo.getProject().getBasedir(), packagedFiles[ii].getSource() );
@@ -124,27 +127,28 @@ public abstract class MojoCommand
                     {
                         source = baseRelative;
                     }
-                    else if ( ! source.exists() )
+                    else if ( !source.exists() )
                     {
                         throw new MojoFailureException( "Failed to copy packagedFile. Cannot locate source: " + source );
                     }
-                    
+
                     source = source.getAbsoluteFile();
                 }
-                
+
                 if ( packagedFiles[ii].isExpandable() )
                 {
-                    File dest = new File( target.getLayout().getBaseDirectory(), packagedFiles[ii].getDestinationPath() );
-                    if ( ! dest.exists() )
+                    File dest = new File( target.getLayout().getInstallationDirectory(),
+                        packagedFiles[ii].getDestinationPath() );
+                    if ( !dest.exists() )
                     {
                         dest.mkdirs();
                     }
-                    
+
                     String fileExtension = source.getName().substring( source.getName().lastIndexOf( '.' ) );
-                    if ( fileExtension.equalsIgnoreCase( ".jar" ) || fileExtension.equalsIgnoreCase( ".zip" ) 
+                    if ( fileExtension.equalsIgnoreCase( ".jar" ) || fileExtension.equalsIgnoreCase( ".zip" )
                         || fileExtension.equalsIgnoreCase( ".war" ) || fileExtension.equalsIgnoreCase( ".sar" ) )
                     {
-                        log.info( "\t\t\t ... expanding " + source  + "\n\t\t\t => to " + dest );
+                        log.info( "\t\t\t ... expanding " + source + "\n\t\t\t => to " + dest );
                         Expand expand = new Expand();
                         expand.setSrc( source );
                         expand.setOverwrite( true );
@@ -156,16 +160,18 @@ public abstract class MojoCommand
                         }
                         catch ( Exception e )
                         {
-                            throw new MojoFailureException( "Failed to expaned packagedFile " + source + ": " + e.getMessage() );
+                            throw new MojoFailureException( "Failed to expaned packagedFile " + source + ": "
+                                + e.getMessage() );
                         }
                     }
-                    
-                    throw new MojoFailureException( "Failed to expand packagedFile: " + source 
+
+                    throw new MojoFailureException( "Failed to expand packagedFile: " + source
                         + ". It does not have a jar, war or zip extension" );
                 }
-                
-                File dest = new File( target.getLayout().getBaseDirectory(), packagedFiles[ii].getDestinationPath() );
-                
+
+                File dest = new File( target.getLayout().getInstallationDirectory(),
+                    packagedFiles[ii].getDestinationPath() );
+
                 if ( packagedFiles[ii].isDirectory() )
                 {
                     try
@@ -174,7 +180,7 @@ public abstract class MojoCommand
                     }
                     catch ( IOException e )
                     {
-                        throw new MojoFailureException( "Failed to copy packagedFile [directory=true] from source " 
+                        throw new MojoFailureException( "Failed to copy packagedFile [directory=true] from source "
                             + source + " to destination " + dest );
                     }
                     continue;
@@ -192,7 +198,7 @@ public abstract class MojoCommand
                     }
                     continue;
                 }
-                
+
                 try
                 {
                     FileUtils.copyFile( source, dest );
@@ -203,7 +209,7 @@ public abstract class MojoCommand
                         " to destination " + dest );
                 }
             }
-            catch ( Exception e ) 
+            catch ( Exception e )
             {
                 log.error( "Failed while processing " + source, e );
             }

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java Fri Sep 17 12:30:31 2010
@@ -36,7 +36,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.server.InstallationLayout;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.tools.ant.taskdefs.Execute;

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java Fri Sep 17 12:30:31 2010
@@ -34,10 +34,6 @@ import org.apache.directory.daemon.insta
 import org.apache.directory.daemon.installers.bin.BinTarget;
 import org.apache.directory.daemon.installers.deb.DebInstallerCommand;
 import org.apache.directory.daemon.installers.deb.DebTarget;
-import org.apache.directory.daemon.installers.inno.InnoInstallerCommand;
-import org.apache.directory.daemon.installers.inno.InnoTarget;
-import org.apache.directory.daemon.installers.izpack.IzPackInstallerCommand;
-import org.apache.directory.daemon.installers.izpack.IzPackTarget;
 import org.apache.directory.daemon.installers.macosxpkg.MacOsXPkgInstallerCommand;
 import org.apache.directory.daemon.installers.macosxpkg.MacOsXPkgTarget;
 import org.apache.directory.daemon.installers.nsis.NsisInstallerCommand;
@@ -100,11 +96,6 @@ public class ServiceInstallersMojo exten
     /**
      * @parameter
      */
-    private IzPackTarget[] izPackTargets;
-
-    /**
-     * @parameter
-     */
     private RpmTarget[] rpmTargets;
 
     /**
@@ -120,11 +111,6 @@ public class ServiceInstallersMojo exten
     /**
      * @parameter
      */
-    private InnoTarget[] innoTargets;
-
-    /**
-     * @parameter
-     */
     private NsisTarget[] nsisTargets;
 
     /**
@@ -245,20 +231,6 @@ public class ServiceInstallersMojo exten
             // Generate all installers
             // ---------------------------------------------------------------
 
-            if ( target instanceof IzPackTarget )
-            {
-                IzPackInstallerCommand izPackCmd = null;
-                izPackCmd = new IzPackInstallerCommand( this, ( IzPackTarget ) target );
-                izPackCmd.execute();
-            }
-
-            if ( target instanceof InnoTarget )
-            {
-                InnoInstallerCommand innoCmd = null;
-                innoCmd = new InnoInstallerCommand( this, ( InnoTarget ) target );
-                innoCmd.execute();
-            }
-
             if ( target instanceof NsisTarget )
             {
                 NsisInstallerCommand nsisCmd = null;
@@ -314,8 +286,6 @@ public class ServiceInstallersMojo exten
     private void initializeAllTargets()
     {
         allTargets = new ArrayList<Target>();
-        addAll( allTargets, izPackTargets );
-        addAll( allTargets, innoTargets );
         addAll( allTargets, nsisTargets );
         addAll( allTargets, rpmTargets );
         addAll( allTargets, debTargets );

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java Fri Sep 17 12:30:31 2010
@@ -24,7 +24,7 @@ import java.io.File;
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.server.InstallationLayout;
 
 
 /**

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java Fri Sep 17 12:30:31 2010
@@ -100,7 +100,7 @@ public class ArchiveInstallerCommand ext
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallationDirectory();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Archive Installer..." );

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java Fri Sep 17 12:30:31 2010
@@ -97,7 +97,7 @@ public class BinInstallerCommand extends
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallationDirectory();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Bin Installer..." );
@@ -119,7 +119,7 @@ public class BinInstallerCommand extends
         catch ( IOException e )
         {
             log.error( e.getMessage() );
-            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getBaseDirectory()
+            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getInstallationDirectory()
                 + ") to the Bin directory (" + binRootFolderDirectory + ")" );
         }
 

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=998095&r1=998094&r2=998095&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 Fri Sep 17 12:30:31 2010
@@ -97,7 +97,7 @@ public class DebInstallerCommand extends
             dpkgUtility = target.getDpkgUtility();
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallationDirectory();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Debian DEB Package..." );
@@ -122,7 +122,7 @@ public class DebInstallerCommand extends
         catch ( IOException e )
         {
             log.error( e.getMessage() );
-            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getBaseDirectory()
+            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getInstallationDirectory()
                 + ") to the DEB directory (" + debApacheDsHomeDirectory + ")" );
         }
 

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=998095&r1=998094&r2=998095&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 Fri Sep 17 12:30:31 2010
@@ -109,7 +109,7 @@ public class MacOsXPkgInstallerCommand e
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallationDirectory();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Mac OS X PKG Installer..." );
@@ -184,7 +184,7 @@ public class MacOsXPkgInstallerCommand e
         catch ( IOException e )
         {
             log.error( e.getMessage() );
-            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getBaseDirectory()
+            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getInstallationDirectory()
                 + ") to the PKG directory (" + pkgRootDirectory + ")" );
         }
 

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java Fri Sep 17 12:30:31 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.daemon.installers.nsis;
 
+
 import org.apache.directory.daemon.installers.MojoCommand;
 import org.apache.directory.daemon.installers.ServiceInstallersMojo;
 import org.apache.directory.daemon.installers.MojoHelperUtils;
@@ -38,6 +39,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
+
 /**
  * Nullsoft INstaller System (NSIS) Installer command for Windows installers
  *
@@ -58,7 +60,7 @@ public class NsisInstallerCommand extend
         super( mymojo );
         this.target = target;
         this.log = mymojo.getLog();
-        File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
+        File imagesDir = target.getLayout().getInstallationDirectory().getParentFile();
         nsisConfigurationFile = new File( imagesDir, target.getId() + ".nsi" );
         initializeFiltering();
     }
@@ -99,7 +101,7 @@ public class NsisInstallerCommand extend
         if ( !target.getNsisCompiler().exists() )
         {
             log.warn( "Cannot find NSIS compiler at this location: " + target.getNsisCompiler() );
-            log.warn( "The build will continue, but please check the location of your makensis executable ");
+            log.warn( "The build will continue, but please check the location of your makensis executable " );
             return;
         }
         else
@@ -123,7 +125,7 @@ public class NsisInstallerCommand extend
             catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to filter and copy project provided "
-                    + target.getNsisConfigurationFile() + " to " + nsisConfigurationFile);
+                    + target.getNsisConfigurationFile() + " to " + nsisConfigurationFile );
             }
         }
         else if ( projectNsisFile.exists() )
@@ -135,7 +137,7 @@ public class NsisInstallerCommand extend
             catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to filter and copy project provided " + projectNsisFile
-                    + " to " + nsisConfigurationFile);
+                    + " to " + nsisConfigurationFile );
             }
         }
         else
@@ -149,7 +151,7 @@ public class NsisInstallerCommand extend
             catch ( IOException e )
             {
                 throw new MojoFailureException( "Failed to filter and copy bundled " + resource + " to "
-                    + nsisConfigurationFile);
+                    + nsisConfigurationFile );
             }
         }
 
@@ -158,7 +160,7 @@ public class NsisInstallerCommand extend
         // -------------------------------------------------------------------
 
         // now copy over the Prunsrv and Prunmgr executables renaming them to the mymojo.getApplicationName() + w for mgr
-        if ( target.getOsFamily().equals( "windows" ))
+        if ( target.getOsFamily().equals( "windows" ) )
         {
             File executableTarget = new File( target.getLayout().getBinDirectory(),
                 target.getApplication().getName() + ".exe" );
@@ -172,23 +174,28 @@ public class NsisInstallerCommand extend
                 }
                 catch ( IOException e )
                 {
-                    throw new MojoFailureException( "Failed to copy project supplied native launcher executable override "
-                        + override.getAbsolutePath() + " into position " + executableTarget.getAbsolutePath() );
+                    throw new MojoFailureException(
+                        "Failed to copy project supplied native launcher executable override "
+                            + override.getAbsolutePath() + " into position " + executableTarget.getAbsolutePath() );
                 }
             }
             else
             {
                 try
                 {
-                    MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "../wrapper/bin/wrapper-windows-x86-32.exe" ), executableTarget );
-                    MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "../wrapper/lib/wrapper-windows-x86-32.dll" ),
+                    MojoHelperUtils
+                        .copyBinaryFile( getClass().getResourceAsStream( "../wrapper/bin/wrapper-windows-x86-32.exe" ),
+                            executableTarget );
+                    MojoHelperUtils.copyBinaryFile(
+                        getClass().getResourceAsStream( "../wrapper/lib/wrapper-windows-x86-32.dll" ),
                             new File( target.getLayout().getLibDirectory(), "wrapper.dll" )
-                    );
+                        );
                 }
                 catch ( IOException e )
                 {
                     throw new MojoFailureException( "Failed to copy native launcher executable file "
-                        + getClass().getResource( "../wrapper/bin/wrapper-windows-x86-32.exe" ) + " into position " + executableTarget.getAbsolutePath() );
+                        + getClass().getResource( "../wrapper/bin/wrapper-windows-x86-32.exe" ) + " into position "
+                        + executableTarget.getAbsolutePath() );
                 }
             }
 
@@ -197,13 +204,13 @@ public class NsisInstallerCommand extend
         processPackagedFiles( target, target.getPackagedFiles() );
 
         Execute task = new Execute();
-        System.out.println( "nsisCompiler = " + nsisCompiler);
-        System.out.println( "nsisConfigurationFile = " + nsisConfigurationFile);
+        System.out.println( "nsisCompiler = " + nsisCompiler );
+        System.out.println( "nsisConfigurationFile = " + nsisConfigurationFile );
         String[] cmd = new String[]
             { nsisCompiler.getAbsolutePath(), nsisConfigurationFile.getAbsolutePath() };
         task.setCommandline( cmd );
         task.setSpawn( true );
-        task.setWorkingDirectory( target.getLayout().getBaseDirectory() );
+        task.setWorkingDirectory( target.getLayout().getInstallationDirectory() );
         try
         {
             task.execute();
@@ -227,7 +234,7 @@ public class NsisInstallerCommand extend
         filterProperties.putAll( mymojo.getProject().getProperties() );
         filterProperties.put( "app", target.getApplication().getName() );
         filterProperties.put( "app.base.dir", mymojo.getProject().getBasedir().getAbsolutePath() );
-                                 
+
         char firstChar = target.getApplication().getName().charAt( 0 );
         firstChar = Character.toUpperCase( firstChar );
         filterProperties.put( "app.displayname", firstChar + target.getApplication().getName().substring( 1 ) );
@@ -275,17 +282,18 @@ public class NsisInstallerCommand extend
         filterProperties.put( "app.description", target.getApplication().getDescription() );
         filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
 
-        if ( !target.getLayout().getReadmeFile().exists() )
-        {
-            touchFile( target.getLayout().getReadmeFile() );
-        }
-        filterProperties.put( "app.readme", target.getLayout().getReadmeFile().getPath() );
-        filterProperties.put( "app.readme.name", target.getLayout().getReadmeFile().getName() );
-        filterProperties.put( "app.icon", target.getLayout().getLogoIconFile().getPath() );
-        filterProperties.put( "app.icon.name", target.getLayout().getLogoIconFile().getName() );
-        filterProperties.put( "image.basedir", target.getLayout().getBaseDirectory().getPath() );
-        filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
-        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent() );
+        // TODO FIXME
+        //        if ( !target.getLayout().getReadmeFile().exists() )
+        //        {
+        //            touchFile( target.getLayout().getReadmeFile() );
+        //        }
+        //        filterProperties.put( "app.readme", target.getLayout().getReadmeFile().getPath() );
+        //        filterProperties.put( "app.readme.name", target.getLayout().getReadmeFile().getName() );
+        //        filterProperties.put( "app.icon", target.getLayout().getLogoIconFile().getPath() );
+        //        filterProperties.put( "app.icon.name", target.getLayout().getLogoIconFile().getName() );
+        //        filterProperties.put( "image.basedir", target.getLayout().getBaseDirectory().getPath() );
+        //        filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
+        //        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent() );
 
         if ( target.getDocsDirectory() != null )
         {
@@ -305,7 +313,7 @@ public class NsisInstallerCommand extend
             filterProperties.put( "sources.directive", "" );
         }
 
-        File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
+        File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt" );
         if ( noticeFile.exists() )
         {
             filterProperties.put( "notice.file", "Source: {#SourceBase}\\NOTICE.txt; DestDir: "
@@ -347,7 +355,7 @@ public class NsisInstallerCommand extend
         {
             // "Source: {#SourceBase}\lib\${artifact.file.name}; DestDir: {app}; DestName: ${app.file.name}"
             buf.append( "Source: {#SourceBase}\\lib\\" );
-            File artifact = ( (Artifact) artifacts.get( ii ) ).getFile();
+            File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
             buf.append( artifact.getName() );
             buf.append( "; DestDir: {app}\\lib; DestName: " );
             buf.append( artifact.getName() );

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java Fri Sep 17 12:30:31 2010
@@ -59,12 +59,12 @@ public class RpmInstallerCommand extends
     private File rpmBuilder;
 
 
-    public RpmInstallerCommand(ServiceInstallersMojo mymojo, RpmTarget target)
+    public RpmInstallerCommand( ServiceInstallersMojo mymojo, RpmTarget target )
     {
         super( mymojo );
         this.target = target;
         this.log = mymojo.getLog();
-        File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
+        File imagesDir = target.getLayout().getInstallationDirectory().getParentFile();
         rpmConfigurationFile = new File( imagesDir, target.getId() + ".spec" );
         initializeFiltering();
     }
@@ -74,8 +74,8 @@ public class RpmInstallerCommand extends
     {
         return filterProperties;
     }
-    
-    
+
+
     /**
      * Performs the following:
      * <ol>
@@ -125,7 +125,8 @@ public class RpmInstallerCommand extends
                 new File( baseDir + "/SOURCES" ).mkdirs();
                 new File( baseDir + "/SPECS" ).mkdirs();
                 new File( baseDir + "/SRPMS" ).mkdirs();
-            } catch ( Exception e )
+            }
+            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." );
@@ -152,41 +153,42 @@ public class RpmInstallerCommand extends
         // -------------------------------------------------------------------
 
         String version = target.getApplication().getVersion().replace( '-', '_' );
-        
-        if ( target.getScriptFile() != null && target.getScriptFile().exists() )
-        {
-            try
-            {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getScriptFile(), 
-                    target.getLayout().getInitScript(), true );
-            }
-            catch ( IOException e )
-            {
-                mymojo.getLog().error( "Failed to copy project supplied init script " + target.getScriptFile()
-                    + " into position " + target.getLayout().getInitScript(), e );
-            }
 
-            if ( mymojo.getLog().isInfoEnabled() )
-            {
-                mymojo.getLog().info( "Using project supplied init script file: "
-                        + target.getScriptFile() );
-            }
-        }
-        else
-        {
-            try
-            {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
-                    "server.init" ), target.getLayout().getInitScript(), true );
-            }
-            catch ( IOException e )
-            {
-                mymojo.getLog().error(
-                    "Failed to copy init script " + getClass().getResource( "server.init" ) + " into position "
-                        + target.getLayout().getInitScript(), e );
-            }
-        }
-        
+        // TODO FIXME
+        //        if ( target.getScriptFile() != null && target.getScriptFile().exists() )
+        //        {
+        //            try
+        //            {
+        //                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getScriptFile(),
+        //                    target.getLayout().getInitScript(), true );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                mymojo.getLog().error( "Failed to copy project supplied init script " + target.getScriptFile()
+        //                    + " into position " + target.getLayout().getInitScript(), e );
+        //            }
+        //
+        //            if ( mymojo.getLog().isInfoEnabled() )
+        //            {
+        //                mymojo.getLog().info( "Using project supplied init script file: "
+        //                        + target.getScriptFile() );
+        //            }
+        //        }
+        //        else
+        //        {
+        //            try
+        //            {
+        //                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+        //                    "server.init" ), target.getLayout().getInitScript(), true );
+        //            }
+        //            catch ( IOException e )
+        //            {
+        //                mymojo.getLog().error(
+        //                    "Failed to copy init script " + getClass().getResource( "server.init" ) + " into position "
+        //                        + target.getLayout().getInitScript(), e );
+        //            }
+        //        }
+
         // check first to see if the default spec file is present in src/main/installers
         File projectRpmFile = new File( mymojo.getSourceDirectory(), "spec.template" );
         if ( target.getRpmSpecificationFile() != null && target.getRpmSpecificationFile().exists() )
@@ -208,7 +210,7 @@ public class RpmInstallerCommand extends
             {
                 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 );
@@ -233,8 +235,13 @@ public class RpmInstallerCommand extends
 
         buildSourceTarball();
         String[] cmd = new String[]
-            { rpmBuilder.getAbsolutePath(), "-ba", "--define", "_topdir " + target.getRpmTopDir().getAbsolutePath(), rpmConfigurationFile.getAbsolutePath() };
-        MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );
+            {
+                rpmBuilder.getAbsolutePath(),
+                "-ba",
+                "--define",
+                "_topdir " + target.getRpmTopDir().getAbsolutePath(),
+                rpmConfigurationFile.getAbsolutePath() };
+        MojoHelperUtils.exec( cmd, target.getLayout().getInstallationDirectory().getParentFile(), target.isDoSudo() );
         String rpmName = target.getApplication().getName() + "-" + version + "-0." + target.getOsArch() + ".rpm";
         File srcFile = new File( target.getRpmTopDir(), "RPMS/" + target.getOsArch() + "/" + rpmName );
         File dstFile = null;
@@ -273,7 +280,7 @@ public class RpmInstallerCommand extends
         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");
+        filterProperties.put( "app.java.home", "java" );
 
         char firstChar = target.getApplication().getName().charAt( 0 );
         firstChar = Character.toUpperCase( firstChar );
@@ -325,24 +332,25 @@ public class RpmInstallerCommand extends
         filterProperties.put( "app.description", target.getApplication().getDescription() );
         filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
 
-        if ( !target.getLayout().getReadmeFile().exists() )
-        {
-            touchFile( target.getLayout().getReadmeFile() );
-        }
-        filterProperties.put( "app.readme", target.getLayout().getReadmeFile().getPath() );
-        filterProperties.put( "app.readme.name", target.getLayout().getReadmeFile().getName() );
-        filterProperties.put( "app.icon", target.getLayout().getLogoIconFile().getName() );
-        filterProperties.put( "app.icon.name", target.getLayout().getLogoIconFile().getName() );
-        filterProperties.put( "image.basedir", target.getLayout().getBaseDirectory().getPath() );
-        filterProperties.put( "install.append.libs", getInstallLibraryJars() );
-        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", "/opt/" + target.getApplication().getName() + "-" + version );
+        // TODO FIXME
+        //        if ( !target.getLayout().getReadmeFile().exists() )
+        //        {
+        //            touchFile( target.getLayout().getReadmeFile() );
+        //        }
+        //        filterProperties.put( "app.readme", target.getLayout().getReadmeFile().getPath() );
+        //        filterProperties.put( "app.readme.name", target.getLayout().getReadmeFile().getName() );
+        //        filterProperties.put( "app.icon", target.getLayout().getLogoIconFile().getName() );
+        //        filterProperties.put( "app.icon.name", target.getLayout().getLogoIconFile().getName() );
+        //        filterProperties.put( "image.basedir", target.getLayout().getBaseDirectory().getPath() );
+        //        filterProperties.put( "install.append.libs", getInstallLibraryJars() );
+        //        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", "/opt/" + target.getApplication().getName() + "-" + version );
 
         if ( target.getDocsDirectory() != null )
         {
-            File docRoot = new File( target.getLayout().getBaseDirectory(), target.getDocsTargetPath() );
+            File docRoot = new File( target.getLayout().getInstallationDirectory(), target.getDocsTargetPath() );
             List<File> docList = new ArrayList<File>( 200 );
             listFiles( docList, docRoot );
             filterProperties.put( "mk.docs.dirs", getMkDocsDirs( docList, target ) );
@@ -358,7 +366,7 @@ public class RpmInstallerCommand extends
 
         if ( target.getSourcesDirectory() != null )
         {
-            File srcRoot = new File( target.getLayout().getBaseDirectory(), target.getSourcesTargetPath() );
+            File srcRoot = new File( target.getLayout().getInstallationDirectory(), target.getSourcesTargetPath() );
             List<File> srcList = new ArrayList<File>( 200 );
             listFiles( srcList, srcRoot );
             filterProperties.put( "mk.sources.dirs", getMkSourcesDirs( srcList, target ) );
@@ -372,10 +380,10 @@ public class RpmInstallerCommand extends
             filterProperties.put( "verify.sources", "" );
         }
 
-        File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
+        File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt" );
         if ( noticeFile.exists() )
         {
-            filterProperties.put( "install.notice.file", "install -m 644 " + target.getLayout().getBaseDirectory()
+            filterProperties.put( "install.notice.file", "install -m 644 " + target.getLayout().getInstallationDirectory()
                 + "/NOTICE.txt $RPM_BUILD_ROOT/opt/" + target.getApplication().getName() + "-%{version}" );
             filterProperties.put( "verify.notice.file", "/opt/" + target.getApplication().getName()
                 + "-%{version}/NOTICE.txt" );
@@ -391,10 +399,10 @@ public class RpmInstallerCommand extends
     static String getMkSourcesDirs( List srcList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallationDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < srcList.size(); ii++ )
         {
@@ -418,10 +426,10 @@ public class RpmInstallerCommand extends
     static String getMkDocsDirs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getBaseDirectory();
+        File docsBase = target.getLayout().getInstallationDirectory();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
@@ -451,8 +459,8 @@ public class RpmInstallerCommand extends
 
         fileList.add( dir );
         File[] files = dir.listFiles();
-        
-        for ( File file:files )
+
+        for ( File file : files )
         {
             if ( file.isFile() )
             {
@@ -467,10 +475,10 @@ public class RpmInstallerCommand extends
     static String getInstallDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getBaseDirectory();
+        File docsBase = target.getLayout().getInstallationDirectory();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
@@ -482,7 +490,7 @@ public class RpmInstallerCommand extends
 
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
-            buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
+            buf.append( target.getLayout().getInstallationDirectory() ).append( "/" );
             buf.append( path );
             buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
@@ -497,16 +505,16 @@ public class RpmInstallerCommand extends
     static String getVerifyDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docBase = target.getLayout().getBaseDirectory();
+        File docBase = target.getLayout().getInstallationDirectory();
         docBase = new File( docBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
             File file = ( File ) docList.get( ii );
             String path = file.getAbsolutePath().substring( basePathSize );
-            buf.append( target.getLayout().getBaseDirectory() );
+            buf.append( target.getLayout().getInstallationDirectory() );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -519,10 +527,10 @@ public class RpmInstallerCommand extends
     static String getInstallSources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallationDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
@@ -534,7 +542,7 @@ public class RpmInstallerCommand extends
 
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
-            buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
+            buf.append( target.getLayout().getInstallationDirectory() ).append( "/" );
             buf.append( path );
             buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
@@ -549,10 +557,10 @@ public class RpmInstallerCommand extends
     static String getVerifySources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallationDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+        int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length() + 1;
 
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
@@ -619,10 +627,10 @@ public class RpmInstallerCommand extends
     {
         String version = target.getApplication().getVersion().replace( '-', '_' );
         String dirname = target.getApplication().getName() + "-" + version;
-        File sourcesDir = new File( target.getLayout().getBaseDirectory().getParentFile(), dirname );
+        File sourcesDir = new File( target.getLayout().getInstallationDirectory().getParentFile(), dirname );
         try
         {
-            FileUtils.copyDirectoryStructure( target.getLayout().getBaseDirectory(), sourcesDir );
+            FileUtils.copyDirectoryStructure( target.getLayout().getInstallationDirectory(), sourcesDir );
         }
         catch ( IOException e1 )
         {
@@ -631,10 +639,13 @@ public class RpmInstallerCommand extends
         }
 
         String[] cmd = new String[]
-            { "tar", "-zcvf",
-            target.getRpmTopDir().getAbsolutePath() + "/SOURCES/" + target.getApplication().getName() + "-" + version + ".tar.gz",
+            {
+                "tar",
+                "-zcvf",
+                target.getRpmTopDir().getAbsolutePath() + "/SOURCES/" + target.getApplication().getName() + "-"
+                    + version + ".tar.gz",
                 sourcesDir.getAbsolutePath() };
 
-        MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );
+        MojoHelperUtils.exec( cmd, target.getLayout().getInstallationDirectory().getParentFile(), target.isDoSudo() );
     }
 }

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=998095&r1=998094&r2=998095&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java Fri Sep 17 12:30:31 2010
@@ -111,7 +111,7 @@ public class SolarisPkgInstallerCommand 
             pkgTranslator = target.getPkgTranslator();
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallationDirectory();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Solaris PKG Installer..." );
@@ -140,7 +140,7 @@ public class SolarisPkgInstallerCommand 
         catch ( IOException e )
         {
             log.error( e.getMessage() );
-            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getBaseDirectory()
+            throw new MojoFailureException( "Failed to copy image (" + target.getLayout().getInstallationDirectory()
                 + ") to the PKG directory (" + apacheDsHomeDirectory + ")" );
         }
 



Mime
View raw message