Author: jvanzyl
Date: Tue Dec  6 05:58:35 2005
New Revision: 354432

URL: http://svn.apache.org/viewcvs?rev=354432&view=rev
Log:
o pushing everything in i have so john can work on jvm args

Modified:
    
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java

Modified: 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
URL: 
http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java?rev=354432&r1=354431&r2=354432&view=diff
==============================================================================
--- 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
 (original)
+++ 
maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
 Tue Dec  6 05:58:35 2005
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
@@ -63,6 +64,8 @@
 
     private String jvm;
 
+    private String argLine;
+
     // ----------------------------------------------------------------------
     // Accessors
     // ----------------------------------------------------------------------
@@ -119,6 +122,11 @@
         this.jvm = jvm;
     }
 
+    public void setArgLine( String argLine )
+    {
+        this.argLine = argLine;
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -231,6 +239,15 @@
 
         cli.addArguments( args );
 
+        String[] s = cli.getShellCommandline();
+
+        for ( int i = 0; i < s.length; i++ )
+        {
+            System.out.println( s[i] + " " );
+        }
+
+        System.out.println();
+
         Writer stringWriter = new StringWriter();
 
         StreamConsumer out = new WriterStreamConsumer( stringWriter );
@@ -316,9 +333,9 @@
     private String[] getForkArgs( String batteryConfig )
         throws Exception
     {
-        String pathSeparator = System.getProperty( "path.separator" );
+        //String classpathEntries =  quotedPathArgument( makeClasspath( 
classpathUrls ) );
 
-        String classpathEntries = getListOfStringsAsString( classpathUrls, 
pathSeparator );
+        String classpathEntries =  makeClasspath( classpathUrls );
 
         String reportClassNames = getListOfStringsAsString( reports, "," );
 
@@ -342,6 +359,32 @@
         reports.clear();
 
         classpathUrls.clear();
+    }
+
+    private String makeClasspath( List list )
+    {
+        StringBuffer files = new StringBuffer();
+
+        for ( Iterator i = list.iterator(); i.hasNext(); )
+        {
+            String classpathElement = (String) i.next();
+
+            files.append( classpathElement );
+
+            files.append( PS );
+        }
+
+        return files.toString();
+    }
+
+    private String quotedPathArgument( String value )
+    {
+        if ( !StringUtils.isEmpty( value ) )
+        {
+            return "'" + value.replace( '\\', '/' ) + "'";
+        }
+
+        return value;
     }
 
     private String getListOfStringsAsString( List listOfStrings, String 
delimiterParm )


Reply via email to