You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2007/12/12 16:37:43 UTC

svn commit: r603644 - in /servicemix/smx4/runtime/trunk: assembly/src/main/descriptors/ assembly/src/main/distribution/unix-shell/bin/ assembly/src/main/distribution/windows-text/bin/ gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/ ...

Author: chirino
Date: Wed Dec 12 07:37:42 2007
New Revision: 603644

URL: http://svn.apache.org/viewvc?rev=603644&view=rev
Log:
Moved the servicemix.jar to the lib dir.  Fixed the create command so that it chmods that servicemix shell file a+x

Modified:
    servicemix/smx4/runtime/trunk/assembly/src/main/descriptors/unix-bin.xml
    servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
    servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/servicemix.bat
    servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/CreateCommand.java
    servicemix/smx4/runtime/trunk/gshell/gshell-wrapper/src/main/resources/org/apache/servicemix/runtime/gshell/wrapper/all/servicemix-wrapper.conf

Modified: servicemix/smx4/runtime/trunk/assembly/src/main/descriptors/unix-bin.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/descriptors/unix-bin.xml?rev=603644&r1=603643&r2=603644&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/descriptors/unix-bin.xml (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/descriptors/unix-bin.xml Wed Dec 12 07:37:42 2007
@@ -73,7 +73,7 @@
         <!-- Copy over jar files -->
         <fileSet>
             <directory>target/dependencies</directory>
-            <outputDirectory>/bin/</outputDirectory>
+            <outputDirectory>/lib/</outputDirectory>
         </fileSet>
 
     </fileSets>

Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix?rev=603644&r1=603643&r2=603644&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix Wed Dec 12 07:37:42 2007
@@ -268,7 +268,7 @@
             ;;
     esac
 
-    JAR=$SERVICEMIX_HOME/bin/servicemix.jar
+    JAR=$SERVICEMIX_HOME/lib/servicemix.jar
     if $cygwin; then
         SERVICEMIX_HOME=`cygpath --path --windows "$SERVICEMIX_HOME"`
         SERVICEMIX_BASE=`cygpath --path --windows "$SERVICEMIX_BASE"`

Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/servicemix.bat
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/servicemix.bat?rev=603644&r1=603643&r2=603644&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/servicemix.bat (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/servicemix.bat Wed Dec 12 07:37:42 2007
@@ -118,7 +118,7 @@
 :EXECUTE
     SET OPTS=-Dservicemix.startLocalConsole=true -Dservicemix.startRemoteShell=true    
     rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -Dservicemix.home="%SERVICEMIX_HOME%" -Dservicemix.base="%SERVICEMIX_BASE%" -jar "%SERVICEMIX_HOME%\bin\servicemix.jar" %*
+    "%JAVA%" %JAVA_OPTS% %OPTS% -Dservicemix.home="%SERVICEMIX_HOME%" -Dservicemix.base="%SERVICEMIX_BASE%" -jar "%SERVICEMIX_HOME%\lib\servicemix.jar" %*
 
 rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 

Modified: servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/CreateCommand.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/CreateCommand.java?rev=603644&r1=603643&r2=603644&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/CreateCommand.java (original)
+++ servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/CreateCommand.java Wed Dec 12 07:37:42 2007
@@ -28,6 +28,7 @@
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.command.annotation.CommandComponent;
+import org.apache.geronimo.gshell.common.io.PumpStreamHandler;
 import org.apache.geronimo.gshell.support.OsgiCommandSupport;
 
 /**
@@ -68,7 +69,7 @@
 			    copyFilteredResourceToDir(serviceMixBase, "bin/servicemix.bat", props);
 			} else {
 			    copyFilteredResourceToDir(serviceMixBase, "bin/servicemix", props);
-			    // TODO: we should chmod a+x the file if we can.
+			    chmod(new File(serviceMixBase, "bin/servicemix"), "a+x");
 			}
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -176,4 +177,18 @@
 		}
 		
 	}
+	
+	private int chmod(File serviceFile, String mode) throws Exception {
+		ProcessBuilder builder = new ProcessBuilder();
+		builder.command("chmod", mode, serviceFile.getCanonicalPath());
+        Process p = builder.start();
+
+        PumpStreamHandler handler = new PumpStreamHandler(io.inputStream, io.outputStream, io.errorStream);
+        handler.attach(p);
+        handler.start();
+        int status = p.waitFor();
+        handler.stop();
+        return status;
+	}
+
 }

Modified: servicemix/smx4/runtime/trunk/gshell/gshell-wrapper/src/main/resources/org/apache/servicemix/runtime/gshell/wrapper/all/servicemix-wrapper.conf
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/gshell/gshell-wrapper/src/main/resources/org/apache/servicemix/runtime/gshell/wrapper/all/servicemix-wrapper.conf?rev=603644&r1=603643&r2=603644&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/gshell/gshell-wrapper/src/main/resources/org/apache/servicemix/runtime/gshell/wrapper/all/servicemix-wrapper.conf (original)
+++ servicemix/smx4/runtime/trunk/gshell/gshell-wrapper/src/main/resources/org/apache/servicemix/runtime/gshell/wrapper/all/servicemix-wrapper.conf Wed Dec 12 07:37:42 2007
@@ -36,7 +36,7 @@
 # Java Classpath (include wrapper.jar)  Add class path elements as
 #  needed starting from 1
 wrapper.java.classpath.1=%SERVICEMIX_BASE%/lib/servicemix-wrapper.jar
-wrapper.java.classpath.2=%SERVICEMIX_HOME%/bin/servicemix.jar
+wrapper.java.classpath.2=%SERVICEMIX_HOME%/lib/servicemix.jar
 
 # Java Library Path (location of Wrapper.DLL or libwrapper.so)
 wrapper.java.library.path.1=%SERVICEMIX_BASE%/lib/