directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r998197 - in /directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers: ./ nsis/ rpm/
Date Fri, 17 Sep 2010 16:49:29 GMT
Author: pamarcelot
Date: Fri Sep 17 16:49:29 2010
New Revision: 998197

URL: http://svn.apache.org/viewvc?rev=998197&view=rev
Log:
Cleaning useless and unused properties.

Modified:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
Fri Sep 17 16:49:29 2010
@@ -61,7 +61,6 @@ public class CreateImageCommand extends 
         filterProperties.putAll( mymojo.getProject().getProperties() );
         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 )
         {
@@ -375,37 +374,6 @@ public class CreateImageCommand extends 
 
         target.setLibArtifacts( MojoHelperUtils.copyDependencies( mymojo, layout ) );
 
-        // -- copy sources if set --
-
-        if ( target.getSourcesDirectory() != null )
-        {
-            File sourcesDirectory = new File( layout.getInstallationDirectory(), target.getSourcesTargetPath()
);
-            try
-            {
-                FileUtils.copyDirectoryStructure( target.getSourcesDirectory(), sourcesDirectory
);
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy sources exported from " +
target.getSourcesDirectory()
-                    + " to " + sourcesDirectory );
-            }
-        }
-
-        // -- copy doco if set --
-
-        if ( target.getDocsDirectory() != null )
-        {
-            File docsDirectory = new File( layout.getInstallationDirectory(), target.getDocsTargetPath()
);
-            try
-            {
-                FileUtils.copyDirectoryStructure( target.getDocsDirectory(), docsDirectory
);
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy generated docs from " + target.getDocsDirectory()
-                    + " to " + docsDirectory );
-            }
-        }
 
         // -- if present copy the NOTICE.txt file --
 

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/MojoHelperUtils.java
Fri Sep 17 16:49:29 2010
@@ -24,7 +24,6 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -76,17 +75,8 @@ public class MojoHelperUtils
         Writer fileWriter = null;
         try
         {
-            if ( mymojo.getEncoding() == null || mymojo.getEncoding().length() < 1 )
-            {
-                fileReader = new BufferedReader( new InputStreamReader( from ) );
-                fileWriter = new FileWriter( to );
-            }
-            else
-            {
-                FileOutputStream outstream = new FileOutputStream( to );
-                fileReader = new BufferedReader( new InputStreamReader( from, mymojo.getEncoding()
) );
-                fileWriter = new OutputStreamWriter( outstream, mymojo.getEncoding() );
-            }
+            fileReader = new BufferedReader( new InputStreamReader( from ) );
+            fileWriter = new OutputStreamWriter( new FileOutputStream( to ) );
 
             Reader reader = null;
             if ( filtering )

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
Fri Sep 17 16:49:29 2010
@@ -21,10 +21,8 @@ package org.apache.directory.daemon.inst
 
 
 import java.io.File;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -51,7 +49,6 @@ import org.apache.maven.plugin.MojoFailu
 import org.apache.maven.project.MavenProject;
 import org.apache.tools.ant.util.JavaEnvUtils;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.Os;
 
 
 /**
@@ -65,13 +62,6 @@ import org.codehaus.plexus.util.Os;
  */
 public class ServiceInstallersMojo extends AbstractMojo
 {
-    static final String BOOTSTRAPPER_ARTIFACT_ID = "daemon-bootstrappers";
-    static final String BOOTSTRAPPER_GROUP_ID = "org.apache.directory.daemon";
-    static final String LOGGER_ARTIFACT_ID = "slf4j-api";
-    static final String LOGGER_GROUP_ID = "org.slf4j";
-    static final String DAEMON_ARTIFACT_ID = "wrapper";
-    static final String DAEMON_GROUP_ID = "tanukisoft";
-
     /**
      * The target directory into which the mojo creates os and platform 
      * specific images.
@@ -134,42 +124,6 @@ public class ServiceInstallersMojo exten
     private Application application;
 
     /**
-     * @parameter 
-     * @required
-     */
-    private String applicationClass;
-
-    /**
-     * @parameter
-     */
-    private String encoding;
-
-    /**
-     * @parameter
-     */
-    private String svnBaseUrl;
-
-    /**
-     * @parameter default-value="false"
-     */
-    private boolean packageSources;
-
-    /**
-     * @parameter default-value="false"
-     */
-    private boolean packageDocs;
-
-    /**
-     * @parameter default-value="src"
-     */
-    private String sourcesTargetPath;
-
-    /**
-     * @parameter default-value="docs"
-     */
-    private String docsTargetPath;
-
-    /**
      * @parameter
      */
     private PackagedFile[] packagedFiles;
@@ -186,8 +140,6 @@ public class ServiceInstallersMojo exten
     /** commons-daemon dependency needed by native daemon */
     private Artifact daemon;
 
-    private File exportedSources;
-    private File docsBase;
     private List<Target> allTargets;
 
 
@@ -198,19 +150,16 @@ public class ServiceInstallersMojo exten
         // collect all targets 
         initializeAllTargets();
 
-        // setup exports and docs if specified for installers
-        setupSourcesAndDocs();
-
         // makes sure defaulted values are set to globals
         setDefaults();
 
         // bail if there is nothing to do 
         if ( allTargets.isEmpty() )
         {
-            getLog().info( "==================================================================="
);
+            getLog().info( "-------------------------------------------------------" );
             getLog().info( "[installers:generate]" );
             getLog().info( "No installers to generate." );
-            getLog().info( "==================================================================="
);
+            getLog().info( "-------------------------------------------------------" );
             return;
         }
 
@@ -218,7 +167,7 @@ public class ServiceInstallersMojo exten
         reportSetup();
 
         // search for and find the bootstrapper artifact
-        setBootstrapArtifacts();
+        //        setBootstrapArtifacts();
 
         // generate installers for all targets
         for ( Target target : allTargets )
@@ -447,120 +396,79 @@ public class ServiceInstallersMojo exten
             {
                 target.setOsVersion( "*" );
             }
-
-            if ( packageSources && exportedSources != null && target.getSourcesDirectory()
== null )
-            {
-                target.setSourcesDirectory( exportedSources );
-            }
-
-            if ( packageDocs && docsBase != null && target.getDocsDirectory()
== null )
-            {
-                target.setDocsDirectory( docsBase );
-            }
-
-            if ( target.getSourcesTargetPath() == null )
-            {
-                target.setSourcesTargetPath( sourcesTargetPath );
-            }
-
-            if ( target.getDocsTargetPath() == null )
-            {
-                target.setDocsTargetPath( docsTargetPath );
-            }
-        }
-    }
-
-
-    private void setupSourcesAndDocs() throws MojoFailureException
-    {
-        File generatedDocs = null;
-
-        if ( svnBaseUrl != null )
-        {
-            exportedSources = new File( outputDirectory, "src" );
-            exportSvnSources( exportedSources );
-
-            if ( packageDocs )
-            {
-                generatedDocs = new File( outputDirectory, "docs" );
-                generateDocs( exportedSources, generatedDocs );
-                docsBase = new File( generatedDocs, "target" );
-                docsBase = new File( docsBase, "site" );
-            }
         }
     }
 
 
-    private void setBootstrapArtifacts() throws MojoFailureException
-    {
-        Artifact artifact = null;
-        Iterator artifacts = project.getDependencyArtifacts().iterator();
-
-        while ( artifacts.hasNext() )
-        {
-            artifact = ( Artifact ) artifacts.next();
-            if ( artifact.getArtifactId().equals( BOOTSTRAPPER_ARTIFACT_ID )
-                && artifact.getGroupId().equals( BOOTSTRAPPER_GROUP_ID ) )
-            {
-                getLog().info( "Found bootstrapper dependency with version: " + artifact.getVersion()
);
-                bootstrapper = artifact;
-            }
-            else if ( artifact.getArtifactId().equals( LOGGER_ARTIFACT_ID )
-                && artifact.getGroupId().equals( LOGGER_GROUP_ID ) )
-            {
-                getLog().info( "Found logger dependency with version: " + artifact.getVersion()
);
-                logger = artifact;
-            }
-            else if ( artifact.getArtifactId().equals( DAEMON_ARTIFACT_ID )
-                && artifact.getGroupId().equals( DAEMON_GROUP_ID ) )
-            {
-                getLog().info( "Found daemon dependency with version: " + artifact.getVersion()
);
-                daemon = artifact;
-            }
-        }
-
-        if ( bootstrapper == null )
-        {
-            throw new MojoFailureException( "Bootstrapper dependency artifact required: "
+ BOOTSTRAPPER_GROUP_ID + ":"
-                + BOOTSTRAPPER_ARTIFACT_ID );
-        }
-        if ( logger == null )
-        {
-            throw new MojoFailureException( "Logger dependency artifact required: " + LOGGER_GROUP_ID
+ ":"
-                + LOGGER_ARTIFACT_ID );
-        }
-        if ( daemon == null )
-        {
-            throw new MojoFailureException( "Daemon dependency artifact required: " + DAEMON_GROUP_ID
+ ":"
-                + DAEMON_ARTIFACT_ID );
-        }
-    }
-
+    //    private void setBootstrapArtifacts() throws MojoFailureException
+    //    {
+    //        Artifact artifact = null;
+    //        Iterator artifacts = project.getDependencyArtifacts().iterator();
+    //
+    //        while ( artifacts.hasNext() )
+    //        {
+    //            artifact = ( Artifact ) artifacts.next();
+    //            if ( artifact.getArtifactId().equals( BOOTSTRAPPER_ARTIFACT_ID )
+    //                && artifact.getGroupId().equals( BOOTSTRAPPER_GROUP_ID ) )
+    //            {
+    //                getLog().info( "Found bootstrapper dependency with version: " + artifact.getVersion()
);
+    //                bootstrapper = artifact;
+    //            }
+    //            else if ( artifact.getArtifactId().equals( LOGGER_ARTIFACT_ID )
+    //                && artifact.getGroupId().equals( LOGGER_GROUP_ID ) )
+    //            {
+    //                getLog().info( "Found logger dependency with version: " + artifact.getVersion()
);
+    //                logger = artifact;
+    //            }
+    //            else if ( artifact.getArtifactId().equals( DAEMON_ARTIFACT_ID )
+    //                && artifact.getGroupId().equals( DAEMON_GROUP_ID ) )
+    //            {
+    //                getLog().info( "Found daemon dependency with version: " + artifact.getVersion()
);
+    //                daemon = artifact;
+    //            }
+    //        }
+    //
+    //        if ( bootstrapper == null )
+    //        {
+    //            throw new MojoFailureException( "Bootstrapper dependency artifact required:
" + BOOTSTRAPPER_GROUP_ID + ":"
+    //                + BOOTSTRAPPER_ARTIFACT_ID );
+    //        }
+    //        if ( logger == null )
+    //        {
+    //            throw new MojoFailureException( "Logger dependency artifact required: "
+ LOGGER_GROUP_ID + ":"
+    //                + LOGGER_ARTIFACT_ID );
+    //        }
+    //        if ( daemon == null )
+    //        {
+    //            throw new MojoFailureException( "Daemon dependency artifact required: "
+ DAEMON_GROUP_ID + ":"
+    //                + DAEMON_ARTIFACT_ID );
+    //        }
+    //    }
 
     public void reportSetup()
     {
-        getLog().info( "==================================================================="
);
+        getLog().info( "-------------------------------------------------------" );
         getLog().info( "[installers:create]" );
         getLog().info( "applicationName = " + application.getName() );
         getLog().info( "sourceDirectory = " + sourceDirectory );
         getLog().info( "outputDirectory = " + outputDirectory );
-        getLog().info( "----------------------------- allTargets -----------------------------"
);
-
-        boolean isFirst = true;
+        getLog().info( "---------------------- allTargets ---------------------" );
 
         if ( allTargets != null )
         {
-            if ( isFirst )
-            {
-                isFirst = false;
-            }
-            else
-            {
-                getLog().info( "" );
-            }
+            boolean isFirst = true;
 
             for ( Target target : allTargets )
             {
+                if ( isFirst )
+                {
+                    isFirst = false;
+                }
+                else
+                {
+                    getLog().info( "" );
+                }
+
                 getLog().info( "id: " + target.getId() );
                 getLog().info( "osName: " + target.getOsName() );
                 getLog().info( "osArch: " + target.getOsArch() );
@@ -576,41 +484,6 @@ public class ServiceInstallersMojo exten
     }
 
 
-    private void exportSvnSources( File exportTarget ) throws MojoFailureException
-    {
-        String[] cmd = new String[]
-            { "svn", "export", svnBaseUrl, exportTarget.getAbsolutePath() };
-        MojoHelperUtils.exec( cmd, outputDirectory, false );
-    }
-
-
-    private void generateDocs( File exportTarget, File docsTarget ) throws MojoFailureException
-    {
-        try
-        {
-            FileUtils.copyDirectoryStructure( exportTarget, docsTarget );
-        }
-        catch ( IOException e )
-        {
-            throw new MojoFailureException( "Failed to copy exported sources from svn here
"
-                + exportTarget.getAbsolutePath() + " to " + docsTarget.getAbsolutePath()
);
-        }
-
-        String[] cmd = null;
-        if ( Os.isFamily( "windows" ) )
-        {
-            cmd = new String[]
-                { "mvn.bat", "site", "--non-recursive" };
-        }
-        else
-        {
-            cmd = new String[]
-                { "mvn", "site", "--non-recursive" };
-        }
-        MojoHelperUtils.exec( cmd, docsTarget, false );
-    }
-
-
     public File getOutputDirectory()
     {
         return outputDirectory;
@@ -635,12 +508,6 @@ public class ServiceInstallersMojo exten
     }
 
 
-    public String getEncoding()
-    {
-        return this.encoding;
-    }
-
-
     public MavenProject getProject()
     {
         return project;
@@ -653,12 +520,6 @@ public class ServiceInstallersMojo exten
     }
 
 
-    public String getApplicationClass()
-    {
-        return this.applicationClass;
-    }
-
-
     public File getSourceDirectory()
     {
         return this.sourceDirectory;

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
Fri Sep 17 16:49:29 2010
@@ -71,19 +71,15 @@ public class Target
     private File loggerConfigurationFile;
     private File serverConfigurationFile;
     private File bootstrapperConfigurationFile;
-    private File sourcesDirectory;
-    private File docsDirectory;
-    private String sourcesTargetPath;
-    private String docsTargetPath;
     private File scriptFile;
 
     private InstallationLayout layout;
     private List libArtifacts;
 
     private Application application;
-    
+
     protected PackagedFile[] packagedFiles;
-    
+
 
     public void setApplication( Application application )
     {
@@ -269,54 +265,6 @@ public class Target
     }
 
 
-    public void setSourcesDirectory( File sourcesDirectory )
-    {
-        this.sourcesDirectory = sourcesDirectory;
-    }
-
-
-    public File getSourcesDirectory()
-    {
-        return sourcesDirectory;
-    }
-
-
-    public void setDocsDirectory( File docsDirectory )
-    {
-        this.docsDirectory = docsDirectory;
-    }
-
-
-    public File getDocsDirectory()
-    {
-        return docsDirectory;
-    }
-
-
-    public void setSourcesTargetPath( String sourcesTargetDirectory )
-    {
-        this.sourcesTargetPath = sourcesTargetDirectory;
-    }
-
-
-    public String getSourcesTargetPath()
-    {
-        return sourcesTargetPath;
-    }
-
-
-    public void setDocsTargetPath( String docsTargetDirectory )
-    {
-        this.docsTargetPath = docsTargetDirectory;
-    }
-
-
-    public String getDocsTargetPath()
-    {
-        return docsTargetPath;
-    }
-
-
     public void setPackagedFiles( PackagedFile[] packagedFiles )
     {
         this.packagedFiles = packagedFiles;

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/nsis/NsisInstallerCommand.java
Fri Sep 17 16:49:29 2010
@@ -20,25 +20,23 @@
 package org.apache.directory.daemon.installers.nsis;
 
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Properties;
+
 import org.apache.directory.daemon.installers.MojoCommand;
-import org.apache.directory.daemon.installers.ServiceInstallersMojo;
 import org.apache.directory.daemon.installers.MojoHelperUtils;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.MojoFailureException;
+import org.apache.directory.daemon.installers.ServiceInstallersMojo;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Execute;
 import org.apache.tools.ant.taskdefs.Touch;
-import org.apache.tools.ant.Project;
 import org.codehaus.plexus.util.FileUtils;
 
-import java.util.Properties;
-import java.util.List;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
 
 /**
  * Nullsoft INstaller System (NSIS) Installer command for Windows installers
@@ -295,24 +293,6 @@ public class NsisInstallerCommand extend
         //        filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
         //        filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent()
);
 
-        if ( target.getDocsDirectory() != null )
-        {
-            filterProperties.put( "docs.directive", getDocsDirective() );
-        }
-        else
-        {
-            filterProperties.put( "docs.directive", "" );
-        }
-
-        if ( target.getSourcesDirectory() != null )
-        {
-            filterProperties.put( "sources.directive", getSourcesDirective() );
-        }
-        else
-        {
-            filterProperties.put( "sources.directive", "" );
-        }
-
         File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt"
);
         if ( noticeFile.exists() )
         {
@@ -326,46 +306,6 @@ public class NsisInstallerCommand extend
     }
 
 
-    private String getSourcesDirective()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append( "Source: {#SourceBase}\\" ).append( target.getSourcesTargetPath() );
-        buf.append( "\\*; DestDir: {app}\\" ).append( target.getSourcesTargetPath() );
-        buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
-        return buf.toString();
-    }
-
-
-    private String getDocsDirective()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append( "Source: {#SourceBase}\\" ).append( target.getDocsTargetPath() );
-        buf.append( "\\*; DestDir: {app}\\" ).append( target.getDocsTargetPath() );
-        buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
-        return buf.toString();
-    }
-
-
-    private String getApplicationLibraryJars()
-    {
-        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}"
-            buf.append( "Source: {#SourceBase}\\lib\\" );
-            File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
-            buf.append( artifact.getName() );
-            buf.append( "; DestDir: {app}\\lib; DestName: " );
-            buf.append( artifact.getName() );
-            buf.append( "\n" );
-        }
-
-        return buf.toString();
-    }
-
-
     static void touchFile( File file )
     {
         Touch touch = new Touch();

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=998197&r1=998196&r2=998197&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
Fri Sep 17 16:49:29 2010
@@ -279,7 +279,6 @@ public class RpmInstallerCommand extends
         filterProperties.putAll( mymojo.getProject().getProperties() );
         filterProperties.put( "app", target.getApplication().getName() );
         filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase()
);
-        filterProperties.put( "app.server.class", mymojo.getApplicationClass() );
         filterProperties.put( "app.java.home", "java" );
 
         char firstChar = target.getApplication().getName().charAt( 0 );
@@ -348,37 +347,6 @@ public class RpmInstallerCommand extends
         //        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().getInstallationDirectory(), target.getDocsTargetPath()
);
-            List<File> docList = new ArrayList<File>( 200 );
-            listFiles( docList, docRoot );
-            filterProperties.put( "mk.docs.dirs", getMkDocsDirs( docList, target ) );
-            filterProperties.put( "install.docs", getInstallDocs( docList, target ) );
-            filterProperties.put( "verify.docs", getVerifyDocs( docList, target ) );
-        }
-        else
-        {
-            filterProperties.put( "mk.docs.dirs", "" );
-            filterProperties.put( "install.docs", "" );
-            filterProperties.put( "verify.docs", "" );
-        }
-
-        if ( target.getSourcesDirectory() != null )
-        {
-            File srcRoot = new File( target.getLayout().getInstallationDirectory(), target.getSourcesTargetPath()
);
-            List<File> srcList = new ArrayList<File>( 200 );
-            listFiles( srcList, srcRoot );
-            filterProperties.put( "mk.sources.dirs", getMkSourcesDirs( srcList, target )
);
-            filterProperties.put( "install.sources", getInstallSources( srcList, target )
);
-            filterProperties.put( "verify.sources", getVerifySources( srcList, target ) );
-        }
-        else
-        {
-            filterProperties.put( "mk.sources.dirs", "" );
-            filterProperties.put( "install.sources", "" );
-            filterProperties.put( "verify.sources", "" );
-        }
 
         File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt"
);
         if ( noticeFile.exists() )
@@ -399,8 +367,6 @@ public class RpmInstallerCommand extends
     static String getMkSourcesDirs( List srcList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getInstallationDirectory();
-        srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 
@@ -426,8 +392,6 @@ public class RpmInstallerCommand extends
     static String getMkDocsDirs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getInstallationDirectory();
-        docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 
@@ -475,8 +439,6 @@ public class RpmInstallerCommand extends
     static String getInstallDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docsBase = target.getLayout().getInstallationDirectory();
-        docsBase = new File( docsBase, target.getDocsTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 
@@ -505,8 +467,6 @@ public class RpmInstallerCommand extends
     static String getVerifyDocs( List docList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File docBase = target.getLayout().getInstallationDirectory();
-        docBase = new File( docBase, target.getDocsTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 
@@ -527,8 +487,6 @@ public class RpmInstallerCommand extends
     static String getInstallSources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getInstallationDirectory();
-        srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 
@@ -557,8 +515,6 @@ public class RpmInstallerCommand extends
     static String getVerifySources( List sourceList, Target target )
     {
         StringBuffer buf = new StringBuffer();
-        File srcBase = target.getLayout().getInstallationDirectory();
-        srcBase = new File( srcBase, target.getSourcesTargetPath() );
         // +1 for '/' char 
         int basePathSize = target.getLayout().getInstallationDirectory().getAbsolutePath().length()
+ 1;
 



Mime
View raw message