directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r372415 - in /directory/trunks/apacheds/standalone/installers/plugin: ./ src/main/java/org/apache/directory/server/standalone/installers/ src/main/java/org/apache/directory/server/standalone/installers/izpack/ src/main/resources/org/apache/...
Date Thu, 26 Jan 2006 03:06:07 GMT
Author: akarasulu
Date: Wed Jan 25 19:05:58 2006
New Revision: 372415

URL: http://svn.apache.org/viewcvs?rev=372415&view=rev
Log:
changes ...

 o if resources are in installer package then we can drop qualifiers (prefixes)
 o cleanup logging
 o added new per target and global defaults for substitutable properties
    - applicationJavaVersion
    - applicationUrl
    - applicationEmail
    - applicationAuthor


Added:
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/install_unix.xml
      - copied unchanged from r372405, directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_unix_template.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/install_windows.xml
      - copied unchanged from r372405, directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_windows_template.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/unix_shortcuts.xml
      - copied unchanged from r372405, directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_shortcuts_unix.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/user_input.xml
      - copied unchanged from r372405, directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_user_input.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/windows_shortcuts.xml
      - copied unchanged from r372405, directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_shortcuts_windows.xml
Removed:
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_shortcuts_unix.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_shortcuts_windows.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_unix_template.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_user_input.xml
    directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack/izpack_install_windows_template.xml
Modified:
    directory/trunks/apacheds/standalone/installers/plugin/   (props changed)
    directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
    directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java

Propchange: directory/trunks/apacheds/standalone/installers/plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jan 25 19:05:58 2006
@@ -1,4 +1,5 @@
 .settings
+.cdtproject
 .project
 .classpath
 .deployables

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java?rev=372415&r1=372414&r2=372415&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
(original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
Wed Jan 25 19:05:58 2006
@@ -119,6 +119,26 @@
      * @parameter 
      */
     private String applicationDescription;
+    
+    /**
+     * @parameter 
+     */
+    private String applicationEmail;
+
+    /**
+     * @parameter 
+     */
+    private String applicationJavaVersion;
+
+    /**
+     * @parameter 
+     */
+    private String applicationAuthor;
+
+    /**
+     * @parameter 
+     */
+    private String applicationUrl;
 
     /**
      * @parameter expression="src/main/installers/logo.png"
@@ -245,6 +265,22 @@
             if ( target.getOsVersion() == null )
             {
                 target.setOsVersion( "*" );
+            }
+            if ( target.getApplicationAuthor() == null )
+            {
+                target.setApplicationAuthor( applicationAuthor );
+            }
+            if ( target.getApplicationEmail() == null )
+            {
+                target.setApplicationEmail( applicationEmail );
+            }
+            if ( target.getApplicationJavaVersion() == null )
+            {
+                target.setApplicationJavaVersion( applicationJavaVersion );
+            }
+            if ( target.getApplicationUrl() == null )
+            {
+                target.setApplicationUrl( applicationUrl );
             }
         }
     }

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java?rev=372415&r1=372414&r2=372415&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
(original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
Wed Jan 25 19:05:58 2006
@@ -58,6 +58,11 @@
     private String daemonFramework;
     
     // optional stuff
+    private String applicationAuthor;
+    private String applicationUrl;
+    private String applicationJavaVersion;
+    private String applicationEmail;
+    
     private String minVersion;
     private String maxVersion;
     private String osVersion;
@@ -202,140 +207,50 @@
     }
 
 
-//    /**
-//     * Determines if the target OS family matches the given OS family.
-//     * @param family the family to check for
-//     * @return true if the target OS matches
-//     */
-//    public boolean isFamily( String family )
-//    {
-//        return isOs( family, null, null, null );
-//    }
-//
-//    
-//    /**
-//     * Determines if the target OS matches the given OS name.
-//     *
-//     * @param name the OS name to check for
-//     * @return true if the target OS matches
-//     */
-//    public boolean isName( String name )
-//    {
-//        return isOs( null, name, null, null );
-//    }
-//    
-//
-//    /**
-//     * Determines if the target OS matches the given OS architecture.
-//     *
-//     * @param arch the OS architecture to check for
-//     * @return true if the target OS matches
-//     */
-//    public boolean isArch( String arch )
-//    {
-//        return isOs( null, null, arch, null );
-//    }
-//    
-//
-//    /**
-//     * Determines if the target OS matches the given OS version.
-//     *
-//     * @param version the OS version to check for
-//     * @return true if the OS matches
-//     */
-//    public boolean isVersion( String version )
-//    {
-//        return isOs( null, null, null, version );
-//    }
-//
-//    
-//    /**
-//     * Determines if the OS matches the target's OS family, name, architecture and version
-//     *
-//     * @param family   The OS family
-//     * @param name   The OS name
-//     * @param arch   The OS architecture
-//     * @param version   The OS version
-//     * @return true if the OS matches
-//     */
-//    public boolean isOs( String family, String name, String arch, String version )
-//    {
-//        boolean retValue = false;
-//
-//        if ( family != null || name != null || arch != null || version != null )
-//        {
-//            boolean isFamily = true;
-//            boolean isName = true;
-//            boolean isArch = true;
-//            boolean isVersion = true;
-//
-//            if ( family != null )
-//            {
-//                if ( osFamily.equals( family.toLowerCase() ) )
-//                {
-//                    isFamily = osName.indexOf( "windows" ) > -1;
-//                }
-//                else if ( osFamily.equals( "os/2" ) )
-//                {
-//                    isFamily = osName.indexOf( "os/2" ) > -1;
-//                }
-//                else if ( osFamily.equals( "netware" ) )
-//                {
-//                    isFamily = osName.indexOf( "netware" ) > -1;
-//                }
-//                else if ( family.equals( "dos" ) )
-//                {
-//                    isFamily = !isFamily( "netware" );
-//                }
-//                else if ( family.equals( "mac" ) )
-//                {
-//                    isFamily = osName.indexOf( "mac" ) > -1;
-//                }
-//                else if ( family.equals( "tandem" ) )
-//                {
-//                    isFamily = osName.indexOf( "nonstop_kernel" ) > -1;
-//                }
-//                else if ( family.equals( "unix" ) )
-//                {
-//                    isFamily = !isFamily( "openvms" )
-//                        && ( !isFamily( "mac" ) || osName.endsWith( "x" ) );
-//                }
-//                else if ( family.equals( "win9x" ) )
-//                {
-//                    isFamily = isFamily( "windows" )
-//                        && ( osName.indexOf( "95" ) >= 0
-//                        || osName.indexOf( "98" ) >= 0
-//                        || osName.indexOf( "me" ) >= 0
-//                        || osName.indexOf( "ce" ) >= 0 );
-//                }
-//                else if ( family.equals( "z/os" ) )
-//                {
-//                    isFamily = osName.indexOf( "z/os" ) > -1
-//                        || osName.indexOf( "os/390" ) > -1;
-//                }
-//                else if ( family.equals( "os/400" ) )
-//                {
-//                    isFamily = osName.indexOf( "os/400" ) > -1;
-//                }
-//                else if ( family.equals( "openvms" ) )
-//                {
-//                    isFamily = osName.indexOf( "openvms" ) > -1;
-//                }
-//            }
-//            if ( name != null )
-//            {
-//                isName = name.equals( osName );
-//            }
-//            if ( arch != null )
-//            {
-//                isArch = arch.equals( osName );
-//            }
-//            if ( version != null )
-//            {
-//                isVersion = version.equals( osVersion );
-//            }
-//            retValue = isFamily && isName && isArch && isVersion;
-//        }
-//        return retValue;
-//    }
+    public void setApplicationAuthor(String author)
+    {
+        this.applicationAuthor = author;
+    }
+
+
+    public String getApplicationAuthor()
+    {
+        return applicationAuthor;
+    }
+
+
+    public void setApplicationUrl(String url)
+    {
+        this.applicationUrl = url;
+    }
+
+
+    public String getApplicationUrl()
+    {
+        return applicationUrl;
+    }
+
+
+    public void setApplicationJavaVersion(String javaVersion)
+    {
+        this.applicationJavaVersion = javaVersion;
+    }
+
+
+    public String getApplicationJavaVersion()
+    {
+        return applicationJavaVersion;
+    }
+
+
+    public void setApplicationEmail(String email)
+    {
+        this.applicationEmail = email;
+    }
+
+
+    public String getApplicationEmail()
+    {
+        return applicationEmail;
+    }
 }

Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java?rev=372415&r1=372414&r2=372415&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java
(original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/izpack/IzPackInstallerCommand.java
Wed Jan 25 19:05:58 2006
@@ -41,6 +41,13 @@
  */
 public class IzPackInstallerCommand implements MojoCommand
 {
+    private final static String UNIX_INSTALL = "install_unix.xml";
+    private final static String UNIX_SHORTCUTS = "unix_shortcuts.xml";
+    private final static String WINDOWS_INSTALL = "install_windows.xml";
+    private final static String WINDSOWS_SHORTCUTS = "windows_shortcuts.xml";
+    private final static String USER_INPUT = "user_input.xml";
+    private final static String SHELLLINK_DLL = "ShellLink.dll";
+    
     private final Properties filterProperties = new Properties( System.getProperties() );
     private final ServiceInstallersMojo mymojo;
     private final IzPackTarget target;
@@ -67,7 +74,7 @@
         izPackUserInput = new File( imageDir, target.getId() + "_izpack_install_user_input.xml"
);
         izPackWindowsShortcuts = new File( imageDir, target.getId() + "_izpack_windows_shortcuts.xml"
);
         izPackUnixShortcuts = new File( imageDir, target.getId() + "_izpack_unix_shortcuts.xml"
);
-        shellLinkDll = new File( imageDir, "ShellLink.dll" );
+        shellLinkDll = new File( imageDir, SHELLLINK_DLL );
         initializeFiltering();
     }
     
@@ -122,19 +129,19 @@
                 try
                 {
                     MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( "izpack_install_windows_template.xml"
), izPackInput, true );
+                        getClass().getResourceAsStream( WINDOWS_INSTALL ), izPackInput, true
);
                 }
                 catch ( IOException e )
                 {
                     mymojo.getLog().error( "Failed to copy bundled izpack windows install
file "  
-                        + getClass().getResource( "izpack_install_windows_template.xml" )
+                        + getClass().getResource( WINDOWS_INSTALL )
                         + " into position " + izPackInput, e );
                 }
                 
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
                     mymojo.getLog().info( "Using bundled installer configuration file: "

-                        + getClass().getResource( "izpack_install_windows_template.xml" )
);
+                        + getClass().getResource( WINDOWS_INSTALL ) );
                 }
             }
 
@@ -164,31 +171,31 @@
                 try
                 {
                     MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( "izpack_install_shortcuts_windows.xml"
), izPackWindowsShortcuts, true );
+                        getClass().getResourceAsStream( WINDSOWS_SHORTCUTS ), izPackWindowsShortcuts,
true );
                 }
                 catch ( IOException e )
                 {
                     mymojo.getLog().error( "Failed to copy bundled izpack windows shortcuts
file "  
-                        + getClass().getResource( "izpack_install_shortcuts_windows.xml"
)
+                        + getClass().getResource( WINDSOWS_SHORTCUTS )
                         + " into position " + izPackWindowsShortcuts, e );
                 }
                 
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
                     mymojo.getLog().info( "Using bundled windows shortcuts configuration
file: " 
-                        + getClass().getResource( "izpack_install_shortcuts_windows.xml"
) );
+                        + getClass().getResource( WINDSOWS_SHORTCUTS ) );
                 }
             }
             
             // copy the ShellLink creation dll into the images folder
             try
             {
-                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "ShellLink.dll"
), shellLinkDll );
+                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( SHELLLINK_DLL
), shellLinkDll );
             }
             catch ( IOException e )
             {
                 mymojo.getLog().error( "Failed to copy izpack shellLinkDll file "  
-                    + getClass().getResource( "ShellLink.dll" )
+                    + getClass().getResource( SHELLLINK_DLL )
                     + " into position " + shellLinkDll, e );
             }
         }
@@ -219,19 +226,19 @@
                 try
                 {
                     MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( "izpack_install_unix_template.xml"
), izPackInput, true );
+                        getClass().getResourceAsStream( UNIX_INSTALL ), izPackInput, true
);
                 }
                 catch ( IOException e )
                 {
                     mymojo.getLog().error( "Failed to copy bundled izpack input file for
unix "  
-                        + getClass().getResource( "izpack_install_unix_template.xml" )
+                        + getClass().getResource( UNIX_INSTALL )
                         + " into position " + izPackInput, e );
                 }
                 
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
                     mymojo.getLog().info( "Using bundled installer configuration file: "

-                        + getClass().getResource( "izpack_install_unix_template.xml" ) );
+                        + getClass().getResource( UNIX_INSTALL ) );
                 }
             }
 
@@ -260,19 +267,19 @@
                 try
                 {
                     MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                        getClass().getResourceAsStream( "izpack_install_shortcuts_unix.xml"
), izPackUnixShortcuts, true );
+                        getClass().getResourceAsStream( UNIX_SHORTCUTS ), izPackUnixShortcuts,
true );
                 }
                 catch ( IOException e )
                 {
                     mymojo.getLog().error( "Failed to copy bundled izpack unix shortcuts
file "  
-                        + getClass().getResource( "izpack_install_shortcuts_unix.xml" )
+                        + getClass().getResource( UNIX_SHORTCUTS )
                         + " into position " + izPackUnixShortcuts, e );
                 }
                 
                 if ( mymojo.getLog().isInfoEnabled() )
                 {
                     mymojo.getLog().info( "Using bundled unix shortcuts configuration file:
" 
-                        + getClass().getResource( "izpack_install_shortcuts_unix.xml" ) );
+                        + getClass().getResource( UNIX_SHORTCUTS ) );
                 }
             }
 
@@ -314,12 +321,12 @@
             try
             {
                 MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, 
-                    getClass().getResourceAsStream( "izpack_install_user_input.xml" ), izPackUserInput,
true );
+                    getClass().getResourceAsStream( USER_INPUT ), izPackUserInput, true );
             }
             catch ( IOException e )
             {
                 mymojo.getLog().error( "Failed to copy bundled izpack input file "  
-                    + getClass().getResource( "izpack_install_user_input.xml" )
+                    + getClass().getResource( USER_INPUT )
                     + " into position " + izPackUserInput, e );
             }
             
@@ -390,9 +397,6 @@
 
         if ( target.getOsFamily().equals( "mac" )|| target.getOsFamily().equals( "unix" )
)
         {
-            System.out.println( " ***************************************** " );
-            System.out.println( layout.getInitScript().getName() );
-            System.out.println( " ***************************************** " );
             filterProperties.put( "server.init", layout.getInitScript().getName() );
         }
         



Mime
View raw message