directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1003133 - in /directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers: ./ solarispkg/
Date Thu, 30 Sep 2010 16:14:07 GMT
Author: pamarcelot
Date: Thu Sep 30 16:14:06 2010
New Revision: 1003133

URL: http://svn.apache.org/viewvc?rev=1003133&view=rev
Log:
Code cleaning.

Removed:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java
Modified:
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/AbstractMojoCommand.java
    directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/GenerateMojo.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/solarispkg/SolarisPkgInstallerCommand.java

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/AbstractMojoCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/AbstractMojoCommand.java?rev=1003133&r1=1003132&r2=1003133&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/AbstractMojoCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/AbstractMojoCommand.java
Thu Sep 30 16:14:06 2010
@@ -248,10 +248,10 @@ public abstract class AbstractMojoComman
     private void copyWrapperFiles()
         throws MojoFailureException
     {
-        // Mac OS X x86
-        if ( target.isOsNameMacOSX() && target.isOsArchx86() )
+        try
         {
-            try
+            // Mac OS X x86
+            if ( target.isOsNameMacOSX() && target.isOsArchx86() )
             {
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
                     "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-macosx-universal-32"
), new File(
@@ -261,124 +261,83 @@ public abstract class AbstractMojoComman
                     new File( getInstallationLayout().getLibDirectory(),
                         "libwrapper.jnilib" ) );
             }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
-            }
-        }
 
-        // Mac OS X x86_64
-        if ( target.isOsNameMacOSX() && target.isOsArchX86_64() )
-        {
-            try
+            // Mac OS X x86_64
+            if ( target.isOsNameMacOSX() && target.isOsArchX86_64() )
             {
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-macosx-universal-64"
), new File(
+                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-macosx-universal-64"
), new File(
                         getInstallationLayout().getBinDirectory(), "wrapper" ) );
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-macosx-universal-64.jnilib"
),
-                    new File( getInstallationLayout().getLibDirectory(),
-                        "libwrapper.jnilib" ) );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
+                        "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-macosx-universal-64.jnilib"
),
+                        new File( getInstallationLayout().getLibDirectory(),
+                            "libwrapper.jnilib" ) );
             }
-        }
 
-        // Linux i386 & x86
-        if ( target.isOsNameLinux() && ( target.isOsArchI386() || target.isOsArchx86()
) )
-        {
-            try
+            // Linux i386 & x86
+            if ( target.isOsNameLinux() && ( target.isOsArchI386() || target.isOsArchx86()
) )
             {
                 MojoHelperUtils.copyBinaryFile(
-                    getClass().getResourceAsStream(
-                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-linux-x86-32"
),
-                    new File( getInstallationLayout().getBinDirectory(), "wrapper" ) );
+                        getClass().getResourceAsStream(
+                            "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-linux-x86-32"
),
+                        new File( getInstallationLayout().getBinDirectory(), "wrapper" )
);
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-linux-x86-32.so"
),
-                    new File( getInstallationLayout().getLibDirectory(), "libwrapper.so"
) );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
+                        "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-linux-x86-32.so"
),
+                        new File( getInstallationLayout().getLibDirectory(), "libwrapper.so"
) );
             }
-        }
 
-        // Linux x86_64 & amd64
-        if ( target.isOsNameLinux() && ( target.isOsArchX86_64() || target.isOsArchAmd64()
) )
-        {
-            try
+            // Linux x86_64 & amd64
+            if ( target.isOsNameLinux() && ( target.isOsArchX86_64() || target.isOsArchAmd64()
) )
             {
                 MojoHelperUtils.copyBinaryFile(
-                    getClass().getResourceAsStream(
-                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-linux-x86-64"
),
-                    new File( getInstallationLayout().getBinDirectory(), "wrapper" ) );
+                        getClass().getResourceAsStream(
+                            "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-linux-x86-64"
),
+                        new File( getInstallationLayout().getBinDirectory(), "wrapper" )
);
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-linux-x86-64.so"
),
-                    new File( getInstallationLayout().getLibDirectory(), "libwrapper.so"
) );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
+                        "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-linux-x86-64.so"
),
+                        new File( getInstallationLayout().getLibDirectory(), "libwrapper.so"
) );
             }
-        }
 
-        // Solaris x86
-        if ( target.isOsNameSolaris() && target.isOsArchx86() )
-        {
-            try
+            // Solaris x86
+            if ( target.isOsNameSolaris() && target.isOsArchx86() )
             {
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-solaris-x86-32"
),
-                    new File( getInstallationLayout().getBinDirectory(), "wrapper" ) );
+                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-solaris-x86-32"
),
+                        new File( getInstallationLayout().getBinDirectory(), "wrapper" )
);
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-solaris-x86-32.so"
), new File(
+                        "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-solaris-x86-32.so"
), new File(
                         getInstallationLayout().getLibDirectory(),
-                    "libwrapper.so" ) );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
+                        "libwrapper.so" ) );
             }
-        }
 
-        // Solaris Sparc
-        if ( target.isOsNameSolaris() && target.isOsArchSparc() )
-        {
-            try
+            // Solaris Sparc
+            if ( target.isOsNameSolaris() && target.isOsArchSparc() )
             {
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-solaris-sparc-32"
),
-                    new File( getInstallationLayout().getBinDirectory(), "wrapper" ) );
+                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-solaris-sparc-32"
),
+                        new File( getInstallationLayout().getBinDirectory(), "wrapper" )
);
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-solaris-sparc-32.so"
), new File(
-                        getInstallationLayout().getLibDirectory(),
-                    "libwrapper.so" ) );
+                        "/org/apache/directory/daemon/installers/wrapper/lib/libwrapper-solaris-sparc-32.so"
),
+                        new File(
+                            getInstallationLayout().getLibDirectory(),
+                            "libwrapper.so" ) );
             }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
-            }
-        }
 
-        // Windows
-        if ( target.isOsNameWindows() )
-        {
-            try
+            // Windows
+            if ( target.isOsNameWindows() )
             {
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-windows-x86-32.exe"
),
-                    new File( getInstallationLayout().getBinDirectory(), "wrapper.exe" )
);
+                        "/org/apache/directory/daemon/installers/wrapper/bin/wrapper-windows-x86-32.exe"
),
+                        new File( getInstallationLayout().getBinDirectory(), "wrapper.exe"
) );
                 MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
-                    "/org/apache/directory/daemon/installers/wrapper/lib/wrapper-windows-x86-32.dll"
), new File(
+                        "/org/apache/directory/daemon/installers/wrapper/lib/wrapper-windows-x86-32.dll"
), new File(
                         getInstallationLayout().getLibDirectory(),
-                    "wrapper.dll" ) );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoFailureException( "Failed to copy Tanuki binary files to lib
and bin directories" );
+                        "wrapper.dll" ) );
             }
         }
+        catch ( IOException e )
+        {
+            throw new MojoFailureException( "Failed to copy Tanuki binary files to lib and
bin directories" );
+        }
     }
 }

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/GenerateMojo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/GenerateMojo.java?rev=1003133&r1=1003132&r2=1003133&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/GenerateMojo.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/GenerateMojo.java
Thu Sep 30 16:14:06 2010
@@ -275,6 +275,6 @@ public class GenerateMojo extends Abstra
 
     public Set getExcludes()
     {
-        return this.excludes;
+        return excludes;
     }
 }

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=1003133&r1=1003132&r2=1003133&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
Thu Sep 30 16:14:06 2010
@@ -64,48 +64,96 @@ public class Target
     private String finalName;
 
 
+    /**
+     * Gets the final name.
+     *
+     * @return
+     *      the final name
+     */
     public String getFinalName()
     {
         return finalName;
     }
 
 
+    /**
+     * Gets the id.
+     *
+     * @return
+     *      the id
+     */
     public String getId()
     {
         return id;
     }
 
 
+    /**
+     * Gets the OS architecture.
+     *
+     * @return
+     *      the OS architecture
+     */
     public String getOsArch()
     {
         return osArch;
     }
 
 
+    /**
+     * Gets the OS name.
+     *
+     * @return
+     *      the OS name
+     */
     public String getOsName()
     {
         return osName;
     }
 
 
+    /**
+     * Sets the final name.
+     *
+     * @param finalName
+     *      the final name
+     */
     public void setFinalName( String finalName )
     {
         this.finalName = finalName;
     }
 
 
+    /**
+     * Sets the id.
+     *
+     * @param id
+     *      the id
+     */
     public void setId( String id )
     {
         this.id = id;
     }
 
 
+    /**
+     * Sets the OS architecture.
+     *
+     * @param osArch
+     *      the OS architecture
+     */
     public void setOsArch( String osArch )
     {
         this.osArch = osArch;
     }
 
 
+    /**
+     * Sets the OS name.
+     *
+     * @param osName
+     *      the OS name
+     */
     public void setOsName( String osName )
     {
         this.osName = osName;

Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=1003133&r1=1003132&r2=1003133&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
(original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
Thu Sep 30 16:14:06 2010
@@ -21,15 +21,11 @@ package org.apache.directory.daemon.inst
 
 
 import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
 
 import org.apache.directory.daemon.installers.AbstractMojoCommand;
 import org.apache.directory.daemon.installers.GenerateMojo;
-import org.apache.directory.daemon.installers.MojoHelperUtils;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.tools.ant.taskdefs.Execute;
 
 
 /**
@@ -39,10 +35,6 @@ import org.apache.tools.ant.taskdefs.Exe
  */
 public class SolarisPkgInstallerCommand extends AbstractMojoCommand<SolarisPkgTarget>
 {
-    private File pkgMaker;
-    private File pkgTranslator;
-
-
     /**
      * Creates a new instance of SolarisPkgInstallerCommand.
      *
@@ -84,10 +76,6 @@ public class SolarisPkgInstallerCommand 
             log.warn( "utility." );
             return;
         }
-        else
-        {
-            pkgMaker = target.getPkgMaker();
-        }
 
         // Verifying the 'pkgtrans' utility exists
         if ( !target.getPkgTranslator().exists() )
@@ -97,10 +85,6 @@ public class SolarisPkgInstallerCommand 
             log.warn( "utility." );
             return;
         }
-        else
-        {
-            pkgTranslator = target.getPkgTranslator();
-        }
 
         // TODO FIXME
         //        File baseDirectory = target.getLayout().getInstallationDirectory();
@@ -246,17 +230,17 @@ public class SolarisPkgInstallerCommand 
     {
         super.initializeFilterProperties();
 
-        filterProperties.put( "app", "apacheds" );
-        filterProperties.put( "app.name", "apacheds" );
-        filterProperties.put( "osArch", target.getOsArch() );
-        if ( mojo.getProject().getVersion() != null )
-        {
-            filterProperties.put( "app.version", mojo.getProject().getVersion() );
-        }
-        else
-        {
-            filterProperties.put( "app.version", "1.0" );
-        }
+        //        filterProperties.put( "app", "apacheds" );
+        //        filterProperties.put( "app.name", "apacheds" );
+        //        filterProperties.put( "osArch", target.getOsArch() );
+        //        if ( mojo.getProject().getVersion() != null )
+        //        {
+        //            filterProperties.put( "app.version", mojo.getProject().getVersion()
);
+        //        }
+        //        else
+        //        {
+        //            filterProperties.put( "app.version", "1.0" );
+        //        }
     }
 
 



Mime
View raw message