geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r547378 - in /geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server: RunClientMojo.java StartServerMojo.java
Date Thu, 14 Jun 2007 19:44:11 GMT
Author: jdillon
Date: Thu Jun 14 12:44:10 2007
New Revision: 547378

URL: http://svn.apache.org/viewvc?view=rev&rev=547378
Log:
(GERONIMO-3245) Allow the JVM used to launch the server or client to be configured

Modified:
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java?view=diff&rev=547378&r1=547377&r2=547378
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java
Thu Jun 14 12:44:10 2007
@@ -55,6 +55,13 @@
     private String maximumMemory = null;
 
     /**
+     * The location of the Java Virtual Machine executable to launch the client with.
+     *
+     * @paramter
+     */
+    private File javaVirtualMachine;
+    
+    /**
      * Time in seconds to wait before terminating the forked JVM.
      *
      * @parameter expression="${timeout}" default-value="-1"
@@ -95,6 +102,15 @@
         java.setFailonerror(true);
         java.setFork(true);
 
+        if (javaVirtualMachine != null) {
+            if (!javaVirtualMachine.exists()) {
+                throw new MojoExecutionException("Java virtual machine is not valid: " +
javaVirtualMachine);
+            }
+            
+            log.info("Using Java virtual machine: " + javaVirtualMachine);
+            java.setJvm(javaVirtualMachine.getCanonicalPath());
+        }
+        
         if (timeout > 0) {
             java.setTimeout(new Long(timeout * 1000));
         }

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?view=diff&rev=547378&r1=547377&r2=547378
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Thu Jun 14 12:44:10 2007
@@ -74,7 +74,14 @@
      * @parameter expression="${maximumMemory}"
      */
     private String maximumMemory = null;
-
+    
+    /**
+     * The location of the Java Virtual Machine executable to launch the server with.
+     *
+     * @paramter
+     */
+    private File javaVirtualMachine;
+    
     /**
      * Enable quiet mode.
      *
@@ -162,6 +169,15 @@
         java.setFailonerror(true);
         java.setFork(true);
 
+        if (javaVirtualMachine != null) {
+            if (!javaVirtualMachine.exists()) {
+                throw new MojoExecutionException("Java virtual machine is not valid: " +
javaVirtualMachine);
+            }
+            
+            log.info("Using Java virtual machine: " + javaVirtualMachine);
+            java.setJvm(javaVirtualMachine.getCanonicalPath());
+        }
+        
         if (timeout > 0) {
             java.setTimeout(new Long(timeout * 1000));
         }



Mime
View raw message