directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376624 [2/2] - in /directory/sandbox/akarasulu/rc1/daemon: bootstrappers/src/main/java/org/apache/directory/daemon/ installers-plugin/src/main/java/org/apache/directory/daemon/installers/ installers-plugin/src/main/java/org/apache/director...
Date Fri, 10 Feb 2006 10:50:48 GMT
Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java Fri Feb 10 02:50:45 2006
@@ -52,12 +52,13 @@
     private final InnoTarget target;
     private final File innoConfigurationFile;
     private final Log log;
-    
+
     private File innoCompiler;
-//    private File innoOutputFile;
-    
-    
-    public InnoInstallerCommand( ServiceInstallersMojo mymojo, InnoTarget target )
+
+
+    //    private File innoOutputFile;
+
+    public InnoInstallerCommand(ServiceInstallersMojo mymojo, InnoTarget target)
     {
         this.mymojo = mymojo;
         this.target = target;
@@ -65,8 +66,8 @@
         File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
         innoConfigurationFile = new File( imagesDir, target.getId() + ".iss" );
     }
-    
-    
+
+
     /**
      * Performs the following:
      * <ol>
@@ -84,46 +85,46 @@
         // -------------------------------------------------------------------
         // Step 1 & 4: do some error checking first for compiler and OS
         // -------------------------------------------------------------------
-        
-        if ( ! target.getOsFamily().equals( "windows" ) )
+
+        if ( !target.getOsFamily().equals( "windows" ) )
         {
             throw new MojoFailureException( "Inno installers can only be targeted for windows platforms!" );
         }
-        
-        if ( ! Os.isFamily( "windows" ) ) 
+
+        if ( !Os.isFamily( "windows" ) )
         {
             log.warn( "Inno target " + target.getId() + " cannot be built on a non-windows machine!" );
             log.warn( "The build will not fail because of this acceptable situation." );
             return;
         }
-        
+
         // @todo this should really be a parameter taken from the user's settings
         // because the compiler may be installed in different places and is specific
-        if ( ! target.getInnoCompiler().exists() )
+        if ( !target.getInnoCompiler().exists() )
         {
             throw new MojoFailureException( "Cannot find Inno compiler: " + target.getInnoCompiler() );
         }
         else
         {
-        	this.innoCompiler = target.getInnoCompiler();
+            this.innoCompiler = target.getInnoCompiler();
         }
-        
+
         // -------------------------------------------------------------------
         // Step 2 & 3: copy inno file and filter 
         // -------------------------------------------------------------------
-        
+
         // check first to see if the default install.iss file is present in src/main/installers
         File projectInnoFile = new File( mymojo.getSourceDirectory(), "install.iss" );
         if ( target.getInnoConfigurationFile() != null && target.getInnoConfigurationFile().exists() )
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getInnoConfigurationFile(), 
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getInnoConfigurationFile(),
                     innoConfigurationFile, true );
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy project provided " 
+                throw new MojoFailureException( "Failed to filter and copy project provided "
                     + target.getInnoConfigurationFile() + " to " + innoConfigurationFile );
             }
         }
@@ -131,13 +132,12 @@
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectInnoFile, 
-                    innoConfigurationFile, true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectInnoFile, innoConfigurationFile, true );
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy project provided " 
-                    + projectInnoFile + " to " + innoConfigurationFile );
+                throw new MojoFailureException( "Failed to filter and copy project provided " + projectInnoFile
+                    + " to " + innoConfigurationFile );
             }
         }
         else
@@ -150,17 +150,16 @@
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy bundled " + resource
-                    + " to " + innoConfigurationFile );
+                throw new MojoFailureException( "Failed to filter and copy bundled " + resource + " to "
+                    + innoConfigurationFile );
             }
         }
 
         Execute task = new Execute();
         System.out.println( "innoCompiler = " + innoCompiler );
         System.out.println( "innoConfigurationFile = " + innoConfigurationFile );
-        String[] cmd = new String[] {
-            innoCompiler.getAbsolutePath(), innoConfigurationFile.getAbsolutePath()
-        };
+        String[] cmd = new String[]
+            { innoCompiler.getAbsolutePath(), innoConfigurationFile.getAbsolutePath() };
         task.setCommandline( cmd );
         task.setSpawn( true );
         task.setWorkingDirectory( target.getLayout().getBaseDirectory() );
@@ -170,23 +169,23 @@
         }
         catch ( IOException e )
         {
-            throw new MojoFailureException( "Failed while trying to execute " + innoCompiler.getAbsolutePath() 
-                + ": " + e.getMessage() );
+            throw new MojoFailureException( "Failed while trying to execute " + innoCompiler.getAbsolutePath() + ": "
+                + e.getMessage() );
         }
-        
+
         if ( task.getExitValue() != 0 )
         {
-            throw new MojoFailureException( innoCompiler.getAbsolutePath() 
+            throw new MojoFailureException( innoCompiler.getAbsolutePath()
                 + " execution resulted in a non-zero exit value: " + task.getExitValue() );
         }
     }
 
 
-    private void initializeFiltering() throws MojoFailureException 
+    private void initializeFiltering() throws MojoFailureException
     {
         filterProperties.putAll( mymojo.getProject().getProperties() );
-        filterProperties.put( "app" , target.getApplication().getName() );
-        
+        filterProperties.put( "app", target.getApplication().getName() );
+
         char firstChar = target.getApplication().getName().charAt( 0 );
         firstChar = Character.toUpperCase( firstChar );
         filterProperties.put( "app.displayname", firstChar + target.getApplication().getName().substring( 1 ) );
@@ -207,76 +206,76 @@
         // @todo use the list of committers and add multiple authors to inno
         if ( target.getApplication().getAuthors().isEmpty() )
         {
-            filterProperties.put( "app.author" , "Apache Software Foundation" );
+            filterProperties.put( "app.author", "Apache Software Foundation" );
         }
         else
         {
             filterProperties.put( "app.author", target.getApplication().getAuthors().get( 0 ) );
         }
-        
+
         if ( target.getFinalName() != null )
         {
-            filterProperties.put( "app.final.name" , target.getFinalName() );
+            filterProperties.put( "app.final.name", target.getFinalName() );
         }
         else
         {
-            String finalName = target.getApplication().getName() 
-                + "-" + target.getApplication().getVersion() + "-win32-setup.exe"; 
-            filterProperties.put( "app.final.name" , finalName );
-        }
-        
-        filterProperties.put( "app.email" , target.getApplication().getEmail() );
-        filterProperties.put( "app.url" , target.getApplication().getUrl() );
-        filterProperties.put( "app.java.version" , target.getApplication().getMinimumJavaVersion() );
-        filterProperties.put( "app.license" , target.getLayout().getLicenseFile().getPath() );
-        filterProperties.put( "app.license.name" , target.getLayout().getLicenseFile().getName() );
-        filterProperties.put( "app.company.name" , target.getCompanyName() );
-        filterProperties.put( "app.description" , target.getApplication().getDescription() ); 
+            String finalName = target.getApplication().getName() + "-" + target.getApplication().getVersion()
+                + "-win32-setup.exe";
+            filterProperties.put( "app.final.name", finalName );
+        }
+
+        filterProperties.put( "app.email", target.getApplication().getEmail() );
+        filterProperties.put( "app.url", target.getApplication().getUrl() );
+        filterProperties.put( "app.java.version", target.getApplication().getMinimumJavaVersion() );
+        filterProperties.put( "app.license", target.getLayout().getLicenseFile().getPath() );
+        filterProperties.put( "app.license.name", target.getLayout().getLicenseFile().getName() );
+        filterProperties.put( "app.company.name", target.getCompanyName() );
+        filterProperties.put( "app.description", target.getApplication().getDescription() );
         filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
 
-        if ( ! target.getLayout().getReadmeFile().exists() )
+        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( "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 )
         {
-        	filterProperties.put( "docs.directive", getDocsDirective() );
+            filterProperties.put( "docs.directive", getDocsDirective() );
         }
         else
         {
-        	filterProperties.put( "docs.directive", "" );
+            filterProperties.put( "docs.directive", "" );
         }
-        
+
         if ( target.getSourcesDirectory() != null )
         {
-        	filterProperties.put( "sources.directive", getSourcesDirective() );
+            filterProperties.put( "sources.directive", getSourcesDirective() );
         }
         else
         {
-        	filterProperties.put( "sources.directive", "" );
+            filterProperties.put( "sources.directive", "" );
         }
-        
+
         File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
         if ( noticeFile.exists() )
         {
-            filterProperties.put( "notice.file", "Source: {#SourceBase}\\NOTICE.txt; DestDir: " +
-                    "{app}\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
+            filterProperties.put( "notice.file", "Source: {#SourceBase}\\NOTICE.txt; DestDir: "
+                + "{app}\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
         }
         else
         {
             filterProperties.put( "notice.file", "" );
         }
     }
-    
-    
+
+
     private String getSourcesDirective()
     {
         StringBuffer buf = new StringBuffer();
@@ -285,8 +284,8 @@
         buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
         return buf.toString();
     }
-    
-    
+
+
     private String getDocsDirective()
     {
         StringBuffer buf = new StringBuffer();
@@ -295,13 +294,13 @@
         buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
         return buf.toString();
     }
-    
-    
+
+
     private String getApplicationLibraryJars() throws MojoFailureException
     {
         StringBuffer buf = new StringBuffer();
         List artifacts = target.getLibArtifacts();
-        
+
         for ( int ii = 0; ii < artifacts.size(); ii++ )
         {
             // "Source: {#SourceBase}\lib\${artifact.file.name}; DestDir: {app}; DestName: ${app.file.name}"
@@ -312,11 +311,11 @@
             buf.append( artifact.getName() );
             buf.append( "\n" );
         }
-        
+
         return buf.toString();
     }
 
-    
+
     static void touchFile( File file )
     {
         Touch touch = new Touch();

Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoTarget.java Fri Feb 10 02:50:45 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.directory.daemon.installers.inno;
 
+
 import java.io.File;
 import java.util.Calendar;
 
@@ -33,28 +34,28 @@
     private File innoCompiler = new File( "C:\\Program Files\\Inno Setup 5\\ISCC.exe" );
     private File innoConfigurationFile;
 
-    
+
     public InnoTarget()
     {
-       Calendar cal = Calendar.getInstance();
-       cal.setTimeInMillis( System.currentTimeMillis() );
-       setCopyrightYear( String.valueOf( cal.get( Calendar.YEAR ) ) );
+        Calendar cal = Calendar.getInstance();
+        cal.setTimeInMillis( System.currentTimeMillis() );
+        setCopyrightYear( String.valueOf( cal.get( Calendar.YEAR ) ) );
     }
-    
 
-    public void setInnoCompiler(File innoCompiler)
+
+    public void setInnoCompiler( File innoCompiler )
     {
         this.innoCompiler = innoCompiler;
     }
 
-    
+
     public File getInnoCompiler()
     {
         return innoCompiler;
     }
 
 
-    public void setInnoConfigurationFile(File innoConfigurationFile)
+    public void setInnoConfigurationFile( File innoConfigurationFile )
     {
         this.innoConfigurationFile = innoConfigurationFile;
     }

Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java Fri Feb 10 02:50:45 2006
@@ -47,12 +47,12 @@
     private final static String WINDSOWS_SHORTCUTS = "windows_shortcuts.xml";
     private final static String USER_INPUT = "user_input.xml";
     private final static String SHELLLINK_DLL = "ShellLink.dll";
-    
+
     private final Properties filterProperties = new Properties( System.getProperties() );
     private final ServiceInstallersMojo mymojo;
     private final IzPackTarget target;
     private final InstallationLayout layout;
-    
+
     private File izPackInput;
     private File izPackUserInput;
     private File izPackWindowsShortcuts;
@@ -60,16 +60,16 @@
     private File izPackOutput;
     private File shellLinkDll;
     private File izPackBase;
-    
-    
-    public IzPackInstallerCommand( ServiceInstallersMojo mymojo, IzPackTarget target )
+
+
+    public IzPackInstallerCommand(ServiceInstallersMojo mymojo, IzPackTarget target)
     {
         this.target = target;
         this.layout = target.getLayout();
         this.mymojo = mymojo;
         File imageDir = layout.getBaseDirectory().getParentFile();
         izPackBase = new File( imageDir, target.getId() );
-        
+
         if ( target.getFinalName() != null )
         {
             izPackOutput = new File( imageDir, target.getFinalName() );
@@ -86,8 +86,8 @@
         shellLinkDll = new File( imageDir, SHELLLINK_DLL );
         initializeFiltering();
     }
-    
-    
+
+
     public void execute() throws MojoExecutionException, MojoFailureException
     {
         doIzPackFiles();
@@ -100,8 +100,8 @@
         task.setTaskName( "izpack" );
         task.execute();
     }
-    
-    
+
+
     private void doIzPackFiles() throws MojoFailureException
     {
         // -------------------------------------------------------------------
@@ -118,39 +118,40 @@
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        target.getIzPackInstallFile(), izPackInput, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getIzPackInstallFile(),
+                        izPackInput, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy project supplied izpack install file template "  
-                        + target.getIzPackInstallFile() + " into position " + izPackInput, e );
+                    mymojo.getLog().error(
+                        "Failed to copy project supplied izpack install file template " + target.getIzPackInstallFile()
+                            + " into position " + izPackInput, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using project supplied installer configuration file: " 
-                        + target.getIzPackInstallFile() );
+                    mymojo.getLog().info(
+                        "Using project supplied installer configuration file: " + target.getIzPackInstallFile() );
                 }
             }
             else
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( WINDOWS_INSTALL ), izPackInput, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                        WINDOWS_INSTALL ), izPackInput, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy bundled izpack windows install file "  
-                        + getClass().getResource( WINDOWS_INSTALL )
-                        + " into position " + izPackInput, e );
+                    mymojo.getLog().error(
+                        "Failed to copy bundled izpack windows install file "
+                            + getClass().getResource( WINDOWS_INSTALL ) + " into position " + izPackInput, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using bundled installer configuration file: " 
-                        + getClass().getResource( WINDOWS_INSTALL ) );
+                    mymojo.getLog().info(
+                        "Using bundled installer configuration file: " + getClass().getResource( WINDOWS_INSTALL ) );
                 }
             }
 
@@ -159,43 +160,47 @@
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        target.getIzPackShortcutsWindowsFile(), izPackWindowsShortcuts, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getIzPackShortcutsWindowsFile(),
+                        izPackWindowsShortcuts, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy project supplied izpack windows shortcuts file "  
-                        + target.getIzPackShortcutsWindowsFile()
-                        + " into position " + izPackWindowsShortcuts, e );
+                    mymojo.getLog().error(
+                        "Failed to copy project supplied izpack windows shortcuts file "
+                            + target.getIzPackShortcutsWindowsFile() + " into position " + izPackWindowsShortcuts, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using project supplied windows shortcuts configuration file: " 
-                        + target.getIzPackShortcutsWindowsFile() );
+                    mymojo.getLog().info(
+                        "Using project supplied windows shortcuts configuration file: "
+                            + target.getIzPackShortcutsWindowsFile() );
                 }
             }
             else
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( WINDSOWS_SHORTCUTS ), izPackWindowsShortcuts, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                        WINDSOWS_SHORTCUTS ), izPackWindowsShortcuts, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy bundled izpack windows shortcuts file "  
-                        + getClass().getResource( WINDSOWS_SHORTCUTS )
-                        + " into position " + izPackWindowsShortcuts, e );
+                    mymojo.getLog()
+                        .error(
+                            "Failed to copy bundled izpack windows shortcuts file "
+                                + getClass().getResource( WINDSOWS_SHORTCUTS ) + " into position "
+                                + izPackWindowsShortcuts, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using bundled windows shortcuts configuration file: " 
-                        + getClass().getResource( WINDSOWS_SHORTCUTS ) );
+                    mymojo.getLog().info(
+                        "Using bundled windows shortcuts configuration file: "
+                            + getClass().getResource( WINDSOWS_SHORTCUTS ) );
                 }
             }
-            
+
             // copy the ShellLink creation dll into the images folder
             try
             {
@@ -203,9 +208,9 @@
             }
             catch ( IOException e )
             {
-                mymojo.getLog().error( "Failed to copy izpack shellLinkDll file "  
-                    + getClass().getResource( SHELLLINK_DLL )
-                    + " into position " + shellLinkDll, e );
+                mymojo.getLog().error(
+                    "Failed to copy izpack shellLinkDll file " + getClass().getResource( SHELLLINK_DLL )
+                        + " into position " + shellLinkDll, e );
             }
         }
         else if ( target.getOsFamily().equals( "unix" ) || target.getOsFamily().equals( "mac" ) )
@@ -218,54 +223,52 @@
             File toolsTarget = new File( layout.getBinDirectory(), "apacheds-tools.sh" );
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                    toolsSource, toolsTarget, true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, toolsSource, toolsTarget, true );
             }
             catch ( IOException e )
             {
-                mymojo.getLog().error( "Failed to copy apacheds-tools.sh file "  
-                    + toolsSource
-                    + " into position " + toolsTarget, e );
+                mymojo.getLog().error(
+                    "Failed to copy apacheds-tools.sh file " + toolsSource + " into position " + toolsTarget, e );
             }
-            
+
             if ( target.getIzPackInstallFile() != null && target.getIzPackInstallFile().exists() )
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        target.getIzPackInstallFile(), izPackInput, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getIzPackInstallFile(),
+                        izPackInput, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy project supplied izpack input file "  
-                        + target.getIzPackInstallFile()
-                        + " into position " + izPackInput, e );
+                    mymojo.getLog().error(
+                        "Failed to copy project supplied izpack input file " + target.getIzPackInstallFile()
+                            + " into position " + izPackInput, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using project supplied installer configuration file: " 
-                        + target.getIzPackInstallFile() );
+                    mymojo.getLog().info(
+                        "Using project supplied installer configuration file: " + target.getIzPackInstallFile() );
                 }
             }
             else
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( UNIX_INSTALL ), izPackInput, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                        UNIX_INSTALL ), izPackInput, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy bundled izpack input file for unix "  
-                        + getClass().getResource( UNIX_INSTALL )
-                        + " into position " + izPackInput, e );
+                    mymojo.getLog().error(
+                        "Failed to copy bundled izpack input file for unix " + getClass().getResource( UNIX_INSTALL )
+                            + " into position " + izPackInput, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using bundled installer configuration file: " 
-                        + getClass().getResource( UNIX_INSTALL ) );
+                    mymojo.getLog().info(
+                        "Using bundled installer configuration file: " + getClass().getResource( UNIX_INSTALL ) );
                 }
             }
 
@@ -273,53 +276,54 @@
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        target.getIzPackShortcutsUnixFile(), izPackUnixShortcuts, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getIzPackShortcutsUnixFile(),
+                        izPackUnixShortcuts, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy project supplied izpack unix shortcuts file "  
-                        + target.getIzPackShortcutsUnixFile()
-                        + " into position " + izPackUnixShortcuts, e );
+                    mymojo.getLog().error(
+                        "Failed to copy project supplied izpack unix shortcuts file "
+                            + target.getIzPackShortcutsUnixFile() + " into position " + izPackUnixShortcuts, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using project supplied unix shortcuts configuration file: " 
-                        + target.getIzPackShortcutsUnixFile() );
+                    mymojo.getLog().info(
+                        "Using project supplied unix shortcuts configuration file: "
+                            + target.getIzPackShortcutsUnixFile() );
                 }
             }
             else
             {
                 try
                 {
-                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( UNIX_SHORTCUTS ), izPackUnixShortcuts, true );
+                    MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                        UNIX_SHORTCUTS ), izPackUnixShortcuts, true );
                 }
                 catch ( IOException e )
                 {
-                    mymojo.getLog().error( "Failed to copy bundled izpack unix shortcuts file "  
-                        + getClass().getResource( UNIX_SHORTCUTS )
-                        + " into position " + izPackUnixShortcuts, e );
+                    mymojo.getLog().error(
+                        "Failed to copy bundled izpack unix shortcuts file " + getClass().getResource( UNIX_SHORTCUTS )
+                            + " into position " + izPackUnixShortcuts, e );
                 }
-                
+
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
-                    mymojo.getLog().info( "Using bundled unix shortcuts configuration file: " 
-                        + getClass().getResource( UNIX_SHORTCUTS ) );
+                    mymojo.getLog().info(
+                        "Using bundled unix shortcuts configuration file: " + getClass().getResource( UNIX_SHORTCUTS ) );
                 }
             }
 
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                    getClass().getResourceAsStream( "../template.init" ), layout.getInitScript(), true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                    "../template.init" ), layout.getInitScript(), true );
             }
             catch ( IOException e )
             {
-                mymojo.getLog().error( "Failed to copy init script "  
-                    + getClass().getResource( "../template.init" )
-                    + " into position " + layout.getInitScript(), e );
+                mymojo.getLog().error(
+                    "Failed to copy init script " + getClass().getResource( "../template.init" ) + " into position "
+                        + layout.getInitScript(), e );
             }
         }
 
@@ -327,57 +331,57 @@
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                    target.getIzPackUserInputFile(), izPackUserInput, true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getIzPackUserInputFile(),
+                    izPackUserInput, true );
             }
             catch ( IOException e )
             {
-                mymojo.getLog().error( "Failed to copy project supplied izpack input file "  
-                    + target.getIzPackUserInputFile()
-                    + " into position " + izPackUserInput, e );
+                mymojo.getLog().error(
+                    "Failed to copy project supplied izpack input file " + target.getIzPackUserInputFile()
+                        + " into position " + izPackUserInput, e );
             }
-            
+
             if ( mymojo.getLog().isInfoEnabled() )
             {
-                mymojo.getLog().info( "Using project supplied user input configuration file: " 
-                    + target.getIzPackUserInputFile() );
+                mymojo.getLog().info(
+                    "Using project supplied user input configuration file: " + target.getIzPackUserInputFile() );
             }
         }
         else
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                    getClass().getResourceAsStream( USER_INPUT ), izPackUserInput, true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( USER_INPUT ),
+                    izPackUserInput, true );
             }
             catch ( IOException e )
             {
-                mymojo.getLog().error( "Failed to copy bundled izpack input file "  
-                    + getClass().getResource( USER_INPUT )
-                    + " into position " + izPackUserInput, e );
+                mymojo.getLog().error(
+                    "Failed to copy bundled izpack input file " + getClass().getResource( USER_INPUT )
+                        + " into position " + izPackUserInput, e );
             }
-            
+
             if ( mymojo.getLog().isInfoEnabled() )
             {
-                mymojo.getLog().info( "Using bundled user input configuration file: " 
-                    + target.getIzPackUserInputFile() );
+                mymojo.getLog()
+                    .info( "Using bundled user input configuration file: " + target.getIzPackUserInputFile() );
             }
         }
     }
 
 
-    private void initializeFiltering() 
+    private void initializeFiltering()
     {
         filterProperties.putAll( mymojo.getProject().getProperties() );
-        filterProperties.put( "app" , target.getApplication().getName() );
-        filterProperties.put( "app.caps" , target.getApplication().getName().toUpperCase() );
+        filterProperties.put( "app", target.getApplication().getName() );
+        filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase() );
         filterProperties.put( "app.server.class", mymojo.getApplicationClass() );
 
         if ( target.getApplication().getVersion() != null )
         {
             filterProperties.put( "app.version", target.getApplication().getVersion() );
         }
-        
+
         if ( target.getApplication().getDescription() != null )
         {
             filterProperties.put( "app.init.message", target.getApplication().getDescription() );
@@ -386,46 +390,46 @@
         // -------------------------------------------------------------------
         // WARNING: hard code values just to for testing
         // -------------------------------------------------------------------
-        
+
         // optional properties from mojo but should default:
 
         // @todo use the list of committers and add all of them by adding 
         // additional izpack author tags
         if ( target.getApplication().getAuthors().isEmpty() )
         {
-            filterProperties.put( "app.author" , "Apache Software Foundation" );
+            filterProperties.put( "app.author", "Apache Software Foundation" );
         }
         else
         {
-            filterProperties.put( "app.author" , target.getApplication().getAuthors().get( 0 ) );
+            filterProperties.put( "app.author", target.getApplication().getAuthors().get( 0 ) );
         }
-        
-        filterProperties.put( "app.email" , target.getApplication().getEmail() );
-        filterProperties.put( "app.url" , target.getApplication().getUrl() );
-        filterProperties.put( "app.java.version" , target.getApplication().getMinimumJavaVersion() );
-        
+
+        filterProperties.put( "app.email", target.getApplication().getEmail() );
+        filterProperties.put( "app.url", target.getApplication().getUrl() );
+        filterProperties.put( "app.java.version", target.getApplication().getMinimumJavaVersion() );
+
         // izpack compiler will barf if these files are not present
         // files which are user specified also from mojo
         // these files need to be copied to the image folder of the target
-        
+
         // this one is installed or a defualt is installed by create image command
-        filterProperties.put( "app.license" , layout.getLicenseFile().getPath() );
+        filterProperties.put( "app.license", layout.getLicenseFile().getPath() );
 
-        if ( ! layout.getReadmeFile().exists() )
+        if ( !layout.getReadmeFile().exists() )
         {
             touchFile( layout.getReadmeFile() );
         }
-        filterProperties.put( "app.readme" , layout.getReadmeFile().getPath() );
+        filterProperties.put( "app.readme", layout.getReadmeFile().getPath() );
 
         // this one is installed or a default is installed by create image command
-        filterProperties.put( "app.icon" , layout.getLogoIconFile().getPath() );
-        
+        filterProperties.put( "app.icon", layout.getLogoIconFile().getPath() );
+
         // generated files
         if ( target.getOsFamily().equals( "windows" ) )
         {
-            filterProperties.put( "windows.shortcuts" , izPackWindowsShortcuts.getPath() );
+            filterProperties.put( "windows.shortcuts", izPackWindowsShortcuts.getPath() );
         }
-        
+
         if ( target.getOsFamily().equals( "unix" ) && target.getOsFamily().equals( "unix" ) )
         {
             filterProperties.put( "unix.shortcuts", izPackUnixShortcuts.getPath() );
@@ -433,16 +437,16 @@
         filterProperties.put( "user.input", izPackUserInput.getPath() );
         filterProperties.put( "image.basedir", layout.getBaseDirectory().getPath() );
 
-        if ( target.getOsFamily().equals( "mac" )|| target.getOsFamily().equals( "unix" ) )
+        if ( target.getOsFamily().equals( "mac" ) || target.getOsFamily().equals( "unix" ) )
         {
             filterProperties.put( "server.init", layout.getInitScript().getName() );
         }
-        
+
         // for the substitution of the application's installation path done by izPack
         filterProperties.put( "app.install.base", "%INSTALL_PATH" );
     }
-    
-    
+
+
     static void touchFile( File file )
     {
         Touch touch = new Touch();

Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackTarget.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackTarget.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackTarget.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackTarget.java Fri Feb 10 02:50:45 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.directory.daemon.installers.izpack;
 
+
 import java.io.File;
 
 import org.apache.directory.daemon.installers.Target;
@@ -33,50 +34,50 @@
     private File izPackShortcutsWindowsFile;
     private File izPackShortcutsUnixFile;
     private File izPackUserInputFile;
-    
-    
-    public void setIzPackInstallFile(File izPackInstallFile)
+
+
+    public void setIzPackInstallFile( File izPackInstallFile )
     {
         this.izPackInstallFile = izPackInstallFile;
     }
-    
-    
+
+
     public File getIzPackInstallFile()
     {
         return izPackInstallFile;
     }
-    
-    
-    public void setIzPackShortcutsWindowsFile(File izPackShortcutsWindowsFile)
+
+
+    public void setIzPackShortcutsWindowsFile( File izPackShortcutsWindowsFile )
     {
         this.izPackShortcutsWindowsFile = izPackShortcutsWindowsFile;
     }
-    
-    
+
+
     public File getIzPackShortcutsWindowsFile()
     {
         return izPackShortcutsWindowsFile;
     }
-    
-    
-    public void setIzPackShortcutsUnixFile(File izPackShortcutsUnixFile)
+
+
+    public void setIzPackShortcutsUnixFile( File izPackShortcutsUnixFile )
     {
         this.izPackShortcutsUnixFile = izPackShortcutsUnixFile;
     }
-    
-    
+
+
     public File getIzPackShortcutsUnixFile()
     {
         return izPackShortcutsUnixFile;
     }
-    
-    
-    public void setIzPackUserInputFile(File izPackUserInputFile)
+
+
+    public void setIzPackUserInputFile( File izPackUserInputFile )
     {
         this.izPackUserInputFile = izPackUserInputFile;
     }
-    
-    
+
+
     public File getIzPackUserInputFile()
     {
         return izPackUserInputFile;

Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java Fri Feb 10 02:50:45 2006
@@ -54,11 +54,11 @@
     private final RpmTarget target;
     private final File rpmConfigurationFile;
     private final Log log;
-    
+
     private File rpmBuilder;
-    
-    
-    public RpmInstallerCommand( ServiceInstallersMojo mymojo, RpmTarget target )
+
+
+    public RpmInstallerCommand(ServiceInstallersMojo mymojo, RpmTarget target)
     {
         this.mymojo = mymojo;
         this.target = target;
@@ -66,8 +66,8 @@
         File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
         rpmConfigurationFile = new File( imagesDir, target.getId() + ".spec" );
     }
-    
-    
+
+
     /**
      * Performs the following:
      * <ol>
@@ -85,16 +85,16 @@
         // -------------------------------------------------------------------
         // Step 1 & 4: do some error checking first for builder and OS
         // -------------------------------------------------------------------
-        
-        if ( ! target.getOsFamily().equals( "unix" ) || ! target.getOsName().equalsIgnoreCase( "Linux" ) )
+
+        if ( !target.getOsFamily().equals( "unix" ) || !target.getOsName().equalsIgnoreCase( "Linux" ) )
         {
             log.warn( "RPM target " + target.getId() + " cannot be built for an non-linux based machine!" );
             log.warn( "The target will not be built." );
             log.warn( "The rest of the build will not fail because of this acceptable situation." );
             return;
         }
-        
-        if ( ! Os.isName( "linux" ) ) 
+
+        if ( !Os.isName( "linux" ) )
         {
             log.warn( "os name = " + System.getProperty( "os.name" ) );
             log.warn( "RPM target " + target.getId() + " cannot be built on a non-linux based machine!" );
@@ -102,31 +102,31 @@
             log.warn( "The rest of the build will not fail because of this acceptable situation." );
             return;
         }
-        
-        if ( ! System.getProperties().getProperty( "user.name" ).equals( "root" ) && ! target.isDoSudo() )
+
+        if ( !System.getProperties().getProperty( "user.name" ).equals( "root" ) && !target.isDoSudo() )
         {
-            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( "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;
         }
-        
+
         // @todo this should really be a parameter taken from the user's settings
         // because the compiler may be installed in different places and is specific
-        if ( ! target.getRpmBuilder().exists() )
+        if ( !target.getRpmBuilder().exists() )
         {
             throw new MojoFailureException( "Cannot find rpmbuild: " + target.getRpmBuilder() );
         }
         else
         {
-        	this.rpmBuilder = target.getRpmBuilder();
+            this.rpmBuilder = target.getRpmBuilder();
         }
-        
+
         // -------------------------------------------------------------------
         // Step 2 & 3: copy rpm spec file and filter 
         // -------------------------------------------------------------------
-        
+
         /** HACK!
          * @todo clean me up
          * @see http://issues.apache.org/jira/browse/DIREVE-333 
@@ -135,26 +135,24 @@
         File toolsTarget = new File( target.getLayout().getBinDirectory(), "apacheds-tools.sh" );
         try
         {
-            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                toolsSource, toolsTarget, true );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, toolsSource, toolsTarget, true );
         }
         catch ( IOException e )
         {
-            mymojo.getLog().error( "Failed to copy apacheds-tools.sh file "  
-                + toolsSource
-                + " into position " + toolsTarget, e );
+            mymojo.getLog().error(
+                "Failed to copy apacheds-tools.sh file " + toolsSource + " into position " + toolsTarget, e );
         }
-        
+
         try
         {
-            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                getClass().getResourceAsStream( "../template.init" ), target.getLayout().getInitScript(), true );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass()
+                .getResourceAsStream( "../template.init" ), target.getLayout().getInitScript(), true );
         }
         catch ( IOException e )
         {
-            mymojo.getLog().error( "Failed to copy init script "  
-                + getClass().getResource( "../template.init" )
-                + " into position " + target.getLayout().getInitScript(), e );
+            mymojo.getLog().error(
+                "Failed to copy init script " + getClass().getResource( "../template.init" ) + " into position "
+                    + target.getLayout().getInitScript(), e );
         }
 
         // check first to see if the default spec file is present in src/main/installers
@@ -163,12 +161,12 @@
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getRpmSpecificationFile(), 
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getRpmSpecificationFile(),
                     rpmConfigurationFile, true );
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy project provided " 
+                throw new MojoFailureException( "Failed to filter and copy project provided "
                     + target.getRpmSpecificationFile() + " to " + rpmConfigurationFile );
             }
         }
@@ -176,13 +174,12 @@
         {
             try
             {
-                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectRpmFile, 
-                    rpmConfigurationFile, true );
+                MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectRpmFile, rpmConfigurationFile, true );
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy project provided " 
-                    + projectRpmFile + " to " + rpmConfigurationFile );
+                throw new MojoFailureException( "Failed to filter and copy project provided " + projectRpmFile + " to "
+                    + rpmConfigurationFile );
             }
         }
         else
@@ -195,22 +192,21 @@
             }
             catch ( IOException e )
             {
-                throw new MojoFailureException( "Failed to filter and copy bundled " + resource
-                    + " to " + rpmConfigurationFile );
+                throw new MojoFailureException( "Failed to filter and copy bundled " + resource + " to "
+                    + rpmConfigurationFile );
             }
         }
 
         buildSourceTarball();
-        String[] cmd = new String[] {
-            rpmBuilder.getAbsolutePath(), "-ba", rpmConfigurationFile.getAbsolutePath()
-        };
+        String[] cmd = new String[]
+            { rpmBuilder.getAbsolutePath(), "-ba", rpmConfigurationFile.getAbsolutePath() };
         MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );
-        
+
         String version = target.getApplication().getVersion().replace( '-', '_' );
         String rpmName = target.getApplication().getName() + "-" + version + "-0.i386.rpm";
         File srcFile = new File( "/usr/src/redhat/RPMS/i386", rpmName );
         File dstFile = null;
-        
+
         if ( target.getFinalName() == null )
         {
             dstFile = new File( mymojo.getOutputDirectory(), rpmName );
@@ -218,14 +214,14 @@
         else
         {
             String finalName = target.getFinalName();
-            if ( ! finalName.endsWith( ".rpm" ) )
+            if ( !finalName.endsWith( ".rpm" ) )
             {
-                finalName = finalName + ".rpm" ;
+                finalName = finalName + ".rpm";
             }
-            
+
             dstFile = new File( mymojo.getOutputDirectory(), finalName );
         }
-        
+
         try
         {
             FileUtils.copyFile( srcFile, dstFile );
@@ -238,13 +234,13 @@
     }
 
 
-    private void initializeFiltering() throws MojoFailureException 
+    private void initializeFiltering() throws MojoFailureException
     {
         filterProperties.putAll( mymojo.getProject().getProperties() );
-        filterProperties.put( "app" , target.getApplication().getName() );
-        filterProperties.put( "app.caps" , target.getApplication().getName().toUpperCase() );
+        filterProperties.put( "app", target.getApplication().getName() );
+        filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase() );
         filterProperties.put( "app.server.class", mymojo.getApplicationClass() );
-        
+
         char firstChar = target.getApplication().getName().charAt( 0 );
         firstChar = Character.toUpperCase( firstChar );
         filterProperties.put( "app.display.name", firstChar + target.getApplication().getName().substring( 1 ) );
@@ -268,41 +264,41 @@
         // @todo use the list of committers and add multiple authors to inno
         if ( target.getApplication().getAuthors().isEmpty() )
         {
-            filterProperties.put( "app.author" , "Apache Software Foundation" );
+            filterProperties.put( "app.author", "Apache Software Foundation" );
         }
         else
         {
             filterProperties.put( "app.author", target.getApplication().getAuthors().get( 0 ) );
         }
-        
+
         if ( target.getFinalName() != null )
         {
-            filterProperties.put( "app.final.name" , target.getFinalName() );
+            filterProperties.put( "app.final.name", target.getFinalName() );
         }
         else
         {
-            String finalName = target.getApplication().getName() 
-                + "-" + target.getApplication().getVersion() + "-linux-i386.rpm"; 
-            filterProperties.put( "app.final.name" , finalName );
-        }
-        
-        filterProperties.put( "app.email" , target.getApplication().getEmail() );
-        filterProperties.put( "app.url" , target.getApplication().getUrl() );
-        filterProperties.put( "app.java.version" , target.getApplication().getMinimumJavaVersion() );
-        filterProperties.put( "app.license" , target.getLayout().getLicenseFile().getPath() );
-        filterProperties.put( "app.license.name" , target.getLayout().getLicenseFile().getName() );
-        filterProperties.put( "app.company.name" , target.getCompanyName() );
-        filterProperties.put( "app.description" , target.getApplication().getDescription() ); 
+            String finalName = target.getApplication().getName() + "-" + target.getApplication().getVersion()
+                + "-linux-i386.rpm";
+            filterProperties.put( "app.final.name", finalName );
+        }
+
+        filterProperties.put( "app.email", target.getApplication().getEmail() );
+        filterProperties.put( "app.url", target.getApplication().getUrl() );
+        filterProperties.put( "app.java.version", target.getApplication().getMinimumJavaVersion() );
+        filterProperties.put( "app.license", target.getLayout().getLicenseFile().getPath() );
+        filterProperties.put( "app.license.name", target.getLayout().getLicenseFile().getName() );
+        filterProperties.put( "app.company.name", target.getCompanyName() );
+        filterProperties.put( "app.description", target.getApplication().getDescription() );
         filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
 
-        if ( ! target.getLayout().getReadmeFile().exists() )
+        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( "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() );
@@ -310,7 +306,7 @@
         filterProperties.put( "server.init", target.getLayout().getInitScript().getName() );
 
         filterProperties.put( "app.install.base", "/usr/local/" + target.getApplication().getName() + "-" + version );
-        
+
         if ( target.getDocsDirectory() != null )
         {
             File docRoot = new File( target.getLayout().getBaseDirectory(), target.getDocsTargetPath() );
@@ -346,11 +342,10 @@
         File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
         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() + "-%{version}/NOTICE.txt" );
+            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()
+                + "-%{version}/NOTICE.txt" );
         }
         else
         {
@@ -358,16 +353,16 @@
             filterProperties.put( "verify.notice.file", "" );
         }
     }
-    
-    
+
+
     static String getMkSourcesDirs( List srcList, Target target )
     {
         StringBuffer buf = new StringBuffer();
         File srcBase = target.getLayout().getBaseDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < srcList.size(); ii++ )
         {
             File file = ( File ) srcList.get( ii );
@@ -375,7 +370,7 @@
             {
                 continue;
             }
-            
+
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "mkdir -p $RPM_BUILD_ROOT/usr/local/" );
             buf.append( target.getApplication().getName() );
@@ -385,16 +380,16 @@
         }
         return buf.toString();
     }
-    
-    
+
+
     static String getMkDocsDirs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
         File docsBase = target.getLayout().getBaseDirectory();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
             File file = ( File ) docList.get( ii );
@@ -402,7 +397,7 @@
             {
                 continue;
             }
-            
+
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "mkdir -p $RPM_BUILD_ROOT/usr/local/" );
             buf.append( target.getApplication().getName() );
@@ -413,14 +408,14 @@
         return buf.toString();
     }
 
-    
+
     static void listFiles( List fileList, File dir )
     {
-        if ( dir.isFile() ) 
+        if ( dir.isFile() )
         {
             return;
         }
-        
+
         fileList.add( dir );
         File[] files = dir.listFiles();
         for ( int ii = 0; ii < files.length; ii++ )
@@ -433,16 +428,16 @@
             listFiles( fileList, files[ii] );
         }
     }
-    
-    
+
+
     static String getInstallDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
         File docsBase = target.getLayout().getBaseDirectory();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
             File file = ( File ) docList.get( ii );
@@ -450,7 +445,7 @@
             {
                 continue;
             }
-            
+
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
             buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
@@ -463,7 +458,7 @@
         }
         return buf.toString();
     }
-    
+
 
     static String getVerifyDocs( List docList, Target target )
     {
@@ -471,8 +466,8 @@
         File docBase = target.getLayout().getBaseDirectory();
         docBase = new File( docBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
             File file = ( File ) docList.get( ii );
@@ -485,7 +480,7 @@
         }
         return buf.toString();
     }
-    
+
 
     static String getInstallSources( List sourceList, Target target )
     {
@@ -493,8 +488,8 @@
         File srcBase = target.getLayout().getBaseDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
             File file = ( File ) sourceList.get( ii );
@@ -502,7 +497,7 @@
             {
                 continue;
             }
-            
+
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
             buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
@@ -515,7 +510,7 @@
         }
         return buf.toString();
     }
-    
+
 
     static String getVerifySources( List sourceList, Target target )
     {
@@ -523,8 +518,8 @@
         File srcBase = target.getLayout().getBaseDirectory();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1; 
-        
+        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length() + 1;
+
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
             File file = ( File ) sourceList.get( ii );
@@ -537,7 +532,7 @@
         }
         return buf.toString();
     }
-    
+
 
     private Object getVerifyLibraryJars()
     {
@@ -552,7 +547,7 @@
             buf.append( artifact.getName() );
             buf.append( "\n" );
         }
-        
+
         return buf.toString();
     }
 
@@ -572,11 +567,11 @@
             buf.append( artifact.getName() );
             buf.append( "\n" );
         }
-        
+
         return buf.toString();
     }
 
-    
+
     static void touchFile( File file )
     {
         Touch touch = new Touch();
@@ -597,17 +592,15 @@
         }
         catch ( IOException e1 )
         {
-            throw new MojoFailureException( "failed to copy directory structure at " + 
-                target.getLayout() + " to " + sourcesDir );
+            throw new MojoFailureException( "failed to copy directory structure at " + target.getLayout() + " to "
+                + sourcesDir );
         }
-        
-        String[] cmd = new String[] {
-            "tar", "-zcvf", 
-            "/usr/src/redhat/SOURCES/" + target.getApplication().getName() 
-            + "-" + version + ".tar.gz",
-            sourcesDir.getAbsolutePath()
-        };
-        
+
+        String[] cmd = new String[]
+            { "tar", "-zcvf",
+                "/usr/src/redhat/SOURCES/" + target.getApplication().getName() + "-" + version + ".tar.gz",
+                sourcesDir.getAbsolutePath() };
+
         MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(), target.isDoSudo() );
     }
 }

Modified: directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java?rev=376624&r1=376623&r2=376624&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java (original)
+++ directory/sandbox/akarasulu/rc1/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmTarget.java Fri Feb 10 02:50:45 2006
@@ -33,14 +33,14 @@
     private File rpmBuilder = new File( "/usr/bin/rpmbuild" );
     private File rpmSpecificationFile;
     private boolean doSudo = false;
-    
-    
+
+
     public void setRpmBuilder( File rpmBuilder )
     {
         this.rpmBuilder = rpmBuilder;
     }
 
-    
+
     public File getRpmBuilder()
     {
         return rpmBuilder;



Mime
View raw message