directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r640530 - /directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
Date Mon, 24 Mar 2008 19:21:15 GMT
Author: felixk
Date: Mon Mar 24 12:21:08 2008
New Revision: 640530

URL: http://svn.apache.org/viewvc?rev=640530&view=rev
Log:
Copy wrapper for windows family os

Modified:
    directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java

Modified: directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?rev=640530&r1=640529&r2=640530&view=diff
==============================================================================
--- directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
(original)
+++ directory/daemon/branches/bigbang/plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
Mon Mar 24 12:21:08 2008
@@ -238,6 +238,8 @@
         // Copy Wrapper Files
         // -------------------------------------------------------------------
 
+        // TODO I really wonder if wrapper bin, lib for macosx and solaris don't need to
be
+        // copied in case if os?
         if ( target.getDaemonFramework().equalsIgnoreCase( "tanuki" ) )
         {
             if ( target.getOsName().equalsIgnoreCase( "linux" ) )
@@ -285,7 +287,27 @@
             }
             else
             {
-                throw new MojoFailureException( "Only OsName='linux' supported for configured
daemon framework" );
+                if ( target.getOsFamily().equalsIgnoreCase( "windows" ) )
+                {
+                    try
+                    {
+                        MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
+                            "wrapper/bin/wrapper-windows-x86-32.exe" ), new File( layout.getBinDirectory(),
target
+                            .getApplication().getName() ) );
+                        MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream(
+                            "wrapper/lib/wrapper-windows-x86-32.dll" ), new File( layout.getLibDirectory(),
+                            "libwrapper.so" ) );
+                    }
+                    catch ( IOException e )
+                    {
+                        throw new MojoFailureException( "Failed to copy Tanuki binary files
to lib and bin directories" );
+                    }
+                }
+                else
+                {
+                    throw new MojoFailureException(
+                        "Not supported for configured daemon framework. OsName=" + target.getOsName()
+ " OsFamily=" + target.getOsFamily());
+                }
             }
         }
         else
@@ -353,7 +375,7 @@
                     }
                     else
                     {
-                        throw new MojoFailureException( "OsName='macosx' supports only OsArc='[ppc]'"
);
+                        throw new MojoFailureException( "OsName='macosx' supports only OsArch='[ppc]'"
);
                     }
                 }
                 else



Mime
View raw message