directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r896507 - in /directory/daemon/trunk: ./ bootstrappers/src/main/java/org/apache/directory/daemon/ plugin/src/main/java/org/apache/directory/daemon/installers/ plugin/src/main/java/org/apache/directory/daemon/installers/archive/ plugin/src/m...
Date Wed, 06 Jan 2010 16:29:04 GMT
Author: elecharny
Date: Wed Jan  6 16:29:00 2010
New Revision: 896507

URL: http://svn.apache.org/viewvc?rev=896507&view=rev
Log:
Merging branch into trunk

Added:
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallLayout.java
      - copied unchanged from r896441, directory/daemon/branches/daemon-schema/bootstrappers/src/main/java/org/apache/directory/daemon/InstallLayout.java
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstanceLayout.java
      - copied unchanged from r896441, directory/daemon/branches/daemon-schema/bootstrappers/src/main/java/org/apache/directory/daemon/InstanceLayout.java
Removed:
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/InstallationLayout.java
Modified:
    directory/daemon/trunk/   (props changed)
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/DaemonApplication.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype

Propchange: directory/daemon/trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/daemon/branches/daemon-schema:806630-896441

Modified: directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
(original)
+++ directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
Wed Jan  6 16:29:00 2010
@@ -67,7 +67,7 @@
     /** Random number generator */
     private Random random;
 
-    private InstallationLayout layout;
+    private InstanceLayout layout;
     private ClassLoader application;
     private ClassLoader parent;
     private String startClassName;
@@ -80,11 +80,12 @@
     public void setInstallationLayout( String installationBase )
     {
         log.debug( "Setting layout in Bootstrapper using base: " + installationBase );
-        layout = new InstallationLayout( installationBase );
+        File instanceHome = new File( System.getProperty( "INSTANCE_HOME" ) );
+        layout = new InstanceLayout( new InstallLayout( new File( installationBase ) ), instanceHome
);
 
         try
         {
-            layout.verifyInstallation();
+            layout.verifyLayout();
         }
         catch ( Throwable t )
         {
@@ -94,13 +95,13 @@
         try
         {
             Properties props = new Properties();
-            props.load( new FileInputStream( layout.getBootstrapperConfigurationFile() )
);
+            props.load( new FileInputStream( layout.getInstallLayout().getBootstrapperConfigurationFile()
) );
             startClassName = props.getProperty( START_CLASS_PROP );
             stopClassName = props.getProperty( STOP_CLASS_PROP );
         }
         catch ( Exception e )
         {
-            log.error( "Failed while loading: " + layout.getBootstrapperConfigurationFile(),
e );
+            log.error( "Failed while loading: " + layout.getInstallLayout().getBootstrapperConfigurationFile(),
e );
             System.exit( ExitCodes.PROPLOAD );
         }
     }
@@ -109,7 +110,7 @@
     public void setParentLoader( ClassLoader parentLoader )
     {
         this.parent = parentLoader;
-        URL[] jars = layout.getAllJars();
+        URL[] jars = layout.getInstallLayout().getAllJars();
         this.application = new URLClassLoader( jars, parentLoader );
 
         if ( log.isDebugEnabled() )
@@ -155,7 +156,7 @@
         }
         catch ( Exception e )
         {
-            log.error( "Failed on " + startClassName + ".init(InstallationLayout, String[])",
e );
+            log.error( "Failed on " + startClassName + ".init(InstallLayout, String[])",
e );
             System.exit( ExitCodes.INITIALIZATION );
         }
         Thread.currentThread().setContextClassLoader( parent );
@@ -232,7 +233,7 @@
 
         if ( shutdownPort == -1 )
         {
-            File shutdownPortFile = new File( layout.getRunDirectory(), SHUTDOWN_FILE );
+            File shutdownPortFile = new File( layout.getRunDir(), SHUTDOWN_FILE );
             if ( shutdownPortFile.exists() )
             {
                 BufferedReader in = new BufferedReader( new FileReader( shutdownPortFile
) );
@@ -279,7 +280,7 @@
         try
         {
             shutdownPort = AvailablePortFinder.getNextAvailable( 30003 );
-            File shutdownPortFile = new File( layout.getRunDirectory(), SHUTDOWN_FILE );
+            File shutdownPortFile = new File( layout.getRunDir(), SHUTDOWN_FILE );
             if ( shutdownPortFile.exists() )
             {
                 String msg = "Shutdown port file " + shutdownPortFile + " exists. ";
@@ -298,7 +299,7 @@
             {
                 public void run()
                 {
-                    File shutdownPortFile = new File( layout.getRunDirectory(), SHUTDOWN_FILE
);
+                    File shutdownPortFile = new File( layout.getRunDir(), SHUTDOWN_FILE );
                     if ( shutdownPortFile.exists() )
                     {
                         shutdownPortFile.delete();
@@ -416,7 +417,7 @@
             log.debug( "Failed on socket close", e );
         }
 
-        File shutdownPortFile = new File( layout.getRunDirectory(), SHUTDOWN_FILE );
+        File shutdownPortFile = new File( layout.getRunDir(), SHUTDOWN_FILE );
         if ( shutdownPortFile.exists() )
         {
             shutdownPortFile.delete();

Modified: directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/DaemonApplication.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/DaemonApplication.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/DaemonApplication.java
(original)
+++ directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/DaemonApplication.java
Wed Jan  6 16:29:00 2010
@@ -35,7 +35,7 @@
      * @param args the shifted arguments after the installation home path and 
      * the command arguments are removed
      */
-    void init( InstallationLayout layout, String[] args ) throws Exception;
+    void init( InstanceLayout layout, String[] args ) throws Exception;
 
 
     /**

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
Wed Jan  6 16:29:00 2010
@@ -24,7 +24,7 @@
 import java.io.IOException;
 import java.util.Properties;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.daemon.InstallLayout;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.codehaus.plexus.util.FileUtils;
@@ -40,7 +40,7 @@
 {
     private final Properties filterProperties = new Properties( System.getProperties() );
     private final Target target;
-    private InstallationLayout layout;
+    private InstallLayout layout;
 
 
     public CreateImageCommand( ServiceInstallersMojo mojo, Target target )
@@ -81,7 +81,7 @@
         // make the layout directories
         log.info( "Creating image ... " );
         File dir = new File( mymojo.getOutputDirectory(), target.getId() );
-        layout = new InstallationLayout( dir );
+        layout = new InstallLayout( dir );
         target.setLayout( layout );
         layout.mkdirs();
 
@@ -379,7 +379,7 @@
 
         if ( target.getSourcesDirectory() != null )
         {
-            File sourcesDirectory = new File( layout.getBaseDirectory(), target.getSourcesTargetPath()
);
+            File sourcesDirectory = new File( layout.getInstallHomeDir(), target.getSourcesTargetPath()
);
             try
             {
                 FileUtils.copyDirectoryStructure( target.getSourcesDirectory(), sourcesDirectory
);
@@ -395,7 +395,7 @@
 
         if ( target.getDocsDirectory() != null )
         {
-            File docsDirectory = new File( layout.getBaseDirectory(), target.getDocsTargetPath()
);
+            File docsDirectory = new File( layout.getInstallHomeDir(), target.getDocsTargetPath()
);
             try
             {
                 FileUtils.copyDirectoryStructure( target.getDocsDirectory(), docsDirectory
);
@@ -409,7 +409,7 @@
 
         // -- if present copy the NOTICE.txt file --
 
-        File noticeFileTarget = new File( layout.getBaseDirectory(), "NOTICE.txt" );
+        File noticeFileTarget = new File( layout.getInstallHomeDir(), "NOTICE.txt" );
         File noticeFile = new File( "NOTICE.txt" );
         if ( noticeFile.exists() )
         {

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
Wed Jan  6 16:29:00 2010
@@ -135,7 +135,7 @@
                 
                 if ( packagedFiles[ii].isExpandable() )
                 {
-                    File dest = new File( target.getLayout().getBaseDirectory(), packagedFiles[ii].getDestinationPath()
);
+                    File dest = new File( target.getLayout().getInstallHomeDir(), packagedFiles[ii].getDestinationPath()
);
                     if ( ! dest.exists() )
                     {
                         dest.mkdirs();
@@ -165,7 +165,7 @@
                         + ". 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().getInstallHomeDir(), packagedFiles[ii].getDestinationPath()
);
                 
                 if ( packagedFiles[ii].isDirectory() )
                 {

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
Wed Jan  6 16:29:00 2010
@@ -36,7 +36,7 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.daemon.InstallLayout;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.tools.ant.taskdefs.Execute;
@@ -128,7 +128,7 @@
     }
 
 
-    public static List copyDependencies( ServiceInstallersMojo mymojo, InstallationLayout
layout )
+    public static List copyDependencies( ServiceInstallersMojo mymojo, InstallLayout layout
)
         throws MojoFailureException
     {
         List<Artifact> libArtifacts = new ArrayList<Artifact>();

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
Wed Jan  6 16:29:00 2010
@@ -24,7 +24,7 @@
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.daemon.InstallLayout;
 
 
 /**
@@ -78,7 +78,7 @@
     private String docsTargetPath;
     private File scriptFile;
 
-    private InstallationLayout layout;
+    private InstallLayout layout;
     private List libArtifacts;
 
     private Application application;
@@ -210,13 +210,13 @@
     }
 
 
-    public void setLayout( InstallationLayout layout )
+    public void setLayout( InstallLayout layout )
     {
         this.layout = layout;
     }
 
 
-    public InstallationLayout getLayout()
+    public InstallLayout getLayout()
     {
         return layout;
     }

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/archive/ArchiveInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -101,7 +101,7 @@
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallHomeDir();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Archive Installer..." );

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -98,7 +98,7 @@
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallHomeDir();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Bin Installer..." );
@@ -120,7 +120,7 @@
         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().getInstallHomeDir()
                 + ") to the Bin directory (" + binRootFolderDirectory + ")" );
         }
 

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/deb/DebInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -98,7 +98,7 @@
             dpkgUtility = target.getDpkgUtility();
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallHomeDir();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Debian DEB Package..." );
@@ -123,7 +123,7 @@
         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().getInstallHomeDir()
                 + ") to the DEB directory (" + debApacheDsHomeDirectory + ")" );
         }
 

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -64,7 +64,7 @@
         super( mymojo );
         this.target = target;
         this.log = mymojo.getLog();
-        File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
+        File imagesDir = target.getLayout().getInstallHomeDir().getParentFile();
         innoConfigurationFile = new File( imagesDir, target.getId() + ".iss" );
         initializeFiltering();
     }
@@ -247,7 +247,7 @@
             { innoCompiler.getAbsolutePath(), innoConfigurationFile.getAbsolutePath() };
         task.setCommandline( cmd );
         task.setSpawn( true );
-        task.setWorkingDirectory( target.getLayout().getBaseDirectory() );
+        task.setWorkingDirectory( target.getLayout().getInstallHomeDir() );
         try
         {
             task.execute();
@@ -326,9 +326,9 @@
         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( "image.basedir", target.getLayout().getInstallHomeDir().getPath()
);
         filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
-        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent()
);
+        filterProperties.put( "installer.output.directory", target.getLayout().getInstallHomeDir().getParent()
);
 
         if ( target.getDocsDirectory() != null )
         {
@@ -348,7 +348,7 @@
             filterProperties.put( "sources.directive", "" );
         }
 
-        File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
+        File noticeFile = new File( target.getLayout().getInstallHomeDir(), "NOTICE.txt"
);
         if ( noticeFile.exists() )
         {
             filterProperties.put( "notice.file", "Source: {#SourceBase}\\NOTICE.txt; DestDir:
"

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/izpack/IzPackInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -24,7 +24,7 @@
 import java.io.IOException;
 import java.util.Properties;
 
-import org.apache.directory.daemon.InstallationLayout;
+import org.apache.directory.daemon.InstallLayout;
 import org.apache.directory.daemon.installers.MojoCommand;
 import org.apache.directory.daemon.installers.MojoHelperUtils;
 import org.apache.directory.daemon.installers.ServiceInstallersMojo;
@@ -53,7 +53,7 @@
 
     private final Properties filterProperties = new Properties( System.getProperties() );
     private final IzPackTarget target;
-    private final InstallationLayout layout;
+    private final InstallLayout layout;
 
     private File izPackInput;
     private File izPackUserInput;
@@ -69,7 +69,7 @@
         super( mymojo );
         this.target = target;
         this.layout = target.getLayout();
-        File imageDir = layout.getBaseDirectory().getParentFile();
+        File imageDir = layout.getInstallHomeDir().getParentFile();
         izPackBase = new File( imageDir, target.getId() );
 
         if ( target.getFinalName() != null )
@@ -451,7 +451,7 @@
             filterProperties.put( "unix.shortcuts", izPackUnixShortcuts.getPath() );
         }
         filterProperties.put( "user.input", izPackUserInput.getPath() );
-        filterProperties.put( "image.basedir", layout.getBaseDirectory().getPath() );
+        filterProperties.put( "image.basedir", layout.getInstallHomeDir().getPath() );
 
         if ( target.getOsFamily().equals( "mac" ) || target.getOsFamily().equals( "unix"
) )
         {

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/macosxpkg/MacOsXPkgInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -110,7 +110,7 @@
             return;
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallHomeDir();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Mac OS X PKG Installer..." );
@@ -185,7 +185,7 @@
         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().getInstallHomeDir()
                 + ") to the PKG directory (" + pkgRootDirectory + ")" );
         }
 

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -59,7 +59,7 @@
         super( mymojo );
         this.target = target;
         this.log = mymojo.getLog();
-        File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
+        File imagesDir = target.getLayout().getInstallHomeDir().getParentFile();
         nsisConfigurationFile = new File( imagesDir, target.getId() + ".nsi" );
         initializeFiltering();
     }
@@ -204,7 +204,7 @@
             { nsisCompiler.getAbsolutePath(), nsisConfigurationFile.getAbsolutePath() };
         task.setCommandline( cmd );
         task.setSpawn( true );
-        task.setWorkingDirectory( target.getLayout().getBaseDirectory() );
+        task.setWorkingDirectory( target.getLayout().getInstallHomeDir() );
         try
         {
             task.execute();
@@ -284,9 +284,9 @@
         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( "image.basedir", target.getLayout().getInstallHomeDir().getPath()
);
         filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
-        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent()
);
+        filterProperties.put( "installer.output.directory", target.getLayout().getInstallHomeDir().getParent()
);
 
         if ( target.getDocsDirectory() != null )
         {
@@ -306,7 +306,7 @@
             filterProperties.put( "sources.directive", "" );
         }
 
-        File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
+        File noticeFile = new File( target.getLayout().getInstallHomeDir(), "NOTICE.txt"
);
         if ( noticeFile.exists() )
         {
             filterProperties.put( "notice.file", "Source: {#SourceBase}\\NOTICE.txt; DestDir:
"

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -65,7 +65,7 @@
         super( mymojo );
         this.target = target;
         this.log = mymojo.getLog();
-        File imagesDir = target.getLayout().getBaseDirectory().getParentFile();
+        File imagesDir = target.getLayout().getInstallHomeDir().getParentFile();
         rpmConfigurationFile = new File( imagesDir, target.getId() + ".spec" );
         initializeFiltering();
     }
@@ -235,7 +235,7 @@
         buildSourceTarball();
         String[] cmd = new String[]
             { rpmBuilder.getAbsolutePath(), "-ba", "--define", "_topdir " + target.getRpmTopDir().getAbsolutePath(),
rpmConfigurationFile.getAbsolutePath() };
-        MojoHelperUtils.exec( cmd, target.getLayout().getBaseDirectory().getParentFile(),
target.isDoSudo() );
+        MojoHelperUtils.exec( cmd, target.getLayout().getInstallHomeDir().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;
@@ -334,16 +334,16 @@
         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( "image.basedir", target.getLayout().getInstallHomeDir().getPath()
);
         filterProperties.put( "install.append.libs", getInstallLibraryJars() );
         filterProperties.put( "verify.append.libs", getVerifyLibraryJars() );
-        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent()
);
+        filterProperties.put( "installer.output.directory", target.getLayout().getInstallHomeDir().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().getInstallHomeDir(), target.getDocsTargetPath()
);
             List<File> docList = new ArrayList<File>( 200 );
             listFiles( docList, docRoot );
             filterProperties.put( "mk.docs.dirs", getMkDocsDirs( docList, target ) );
@@ -359,7 +359,7 @@
 
         if ( target.getSourcesDirectory() != null )
         {
-            File srcRoot = new File( target.getLayout().getBaseDirectory(), target.getSourcesTargetPath()
);
+            File srcRoot = new File( target.getLayout().getInstallHomeDir(), target.getSourcesTargetPath()
);
             List<File> srcList = new ArrayList<File>( 200 );
             listFiles( srcList, srcRoot );
             filterProperties.put( "mk.sources.dirs", getMkSourcesDirs( srcList, target )
);
@@ -373,10 +373,10 @@
             filterProperties.put( "verify.sources", "" );
         }
 
-        File noticeFile = new File( target.getLayout().getBaseDirectory(), "NOTICE.txt" );
+        File noticeFile = new File( target.getLayout().getInstallHomeDir(), "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().getInstallHomeDir()
                 + "/NOTICE.txt $RPM_BUILD_ROOT/opt/" + target.getApplication().getName()
+ "-%{version}" );
             filterProperties.put( "verify.notice.file", "/opt/" + target.getApplication().getName()
                 + "-%{version}/NOTICE.txt" );
@@ -392,10 +392,10 @@
     static String getMkSourcesDirs( List srcList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallHomeDir();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().getAbsolutePath().length()
+ 1;
 
         for ( int ii = 0; ii < srcList.size(); ii++ )
         {
@@ -419,10 +419,10 @@
     static String getMkDocsDirs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getBaseDirectory();
+        File docsBase = target.getLayout().getInstallHomeDir();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().getAbsolutePath().length()
+ 1;
 
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
@@ -468,10 +468,10 @@
     static String getInstallDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getBaseDirectory();
+        File docsBase = target.getLayout().getInstallHomeDir();
         docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().getAbsolutePath().length()
+ 1;
 
         for ( int ii = 0; ii < docList.size(); ii++ )
         {
@@ -483,7 +483,7 @@
 
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
-            buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
+            buf.append( target.getLayout().getInstallHomeDir() ).append( "/" );
             buf.append( path );
             buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
@@ -498,16 +498,16 @@
     static String getVerifyDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docBase = target.getLayout().getBaseDirectory();
+        File docBase = target.getLayout().getInstallHomeDir();
         docBase = new File( docBase, target.getDocsTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().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().getInstallHomeDir() );
             buf.append( target.getApplication().getName() );
             buf.append( "-%{version}/" );
             buf.append( path );
@@ -520,10 +520,10 @@
     static String getInstallSources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallHomeDir();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().getAbsolutePath().length()
+ 1;
 
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
@@ -535,7 +535,7 @@
 
             String path = file.getAbsolutePath().substring( basePathSize );
             buf.append( "install -m 644 " );
-            buf.append( target.getLayout().getBaseDirectory() ).append( "/" );
+            buf.append( target.getLayout().getInstallHomeDir() ).append( "/" );
             buf.append( path );
             buf.append( " $RPM_BUILD_ROOT/opt/" );
             buf.append( target.getApplication().getName() );
@@ -550,10 +550,10 @@
     static String getVerifySources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getBaseDirectory();
+        File srcBase = target.getLayout().getInstallHomeDir();
         srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
-        int basePathSize = target.getLayout().getBaseDirectory().getAbsolutePath().length()
+ 1;
+        int basePathSize = target.getLayout().getInstallHomeDir().getAbsolutePath().length()
+ 1;
 
         for ( int ii = 0; ii < sourceList.size(); ii++ )
         {
@@ -620,10 +620,10 @@
     {
         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().getInstallHomeDir().getParentFile(),
dirname );
         try
         {
-            FileUtils.copyDirectoryStructure( target.getLayout().getBaseDirectory(), sourcesDir
);
+            FileUtils.copyDirectoryStructure( target.getLayout().getInstallHomeDir(), sourcesDir
);
         }
         catch ( IOException e1 )
         {
@@ -636,6 +636,6 @@
             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().getInstallHomeDir().getParentFile(),
target.isDoSudo() );
     }
 }

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
Wed Jan  6 16:29:00 2010
@@ -112,7 +112,7 @@
             pkgTranslator = target.getPkgTranslator();
         }
 
-        File baseDirectory = target.getLayout().getBaseDirectory();
+        File baseDirectory = target.getLayout().getInstallHomeDir();
         File imagesDirectory = baseDirectory.getParentFile();
 
         log.info( "Creating Solaris PKG Installer..." );
@@ -141,7 +141,7 @@
         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().getInstallHomeDir()
                 + ") to the PKG directory (" + apacheDsHomeDirectory + ")" );
         }
 

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype?rev=896507&r1=896506&r2=896507&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
Wed Jan  6 16:29:00 2010
@@ -56,7 +56,7 @@
 f none /opt/apacheds/lib/jetty-util-6.1.14.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/libwrapper.so 0644 apacheds apacheds
 f none /opt/apacheds/lib/log4j-1.2.14.jar 0644 apacheds apacheds
-f none /opt/apacheds/lib/mina-core-2.0.0-M6.jar 0644 apacheds apacheds
+f none /opt/apacheds/lib/mina-core-2.0.0-RC1.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/servlet-api-2.5-6.1.14.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/shared-asn1-0.9.18-SNAPSHOT.jar 0644 apacheds apacheds
 f none /opt/apacheds/lib/shared-asn1-codec-0.9.18-SNAPSHOT.jar 0644 apacheds apacheds



Mime
View raw message