Author: ffang
Date: Thu May  2 07:27:29 2013
New Revision: 1478291

URL: http://svn.apache.org/r1478291
Log:
[CXF-4982]Codegen maven plugin fails forked execution on Windows when default 
tmp dir contain space

Modified:
    
cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Modified: 
cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1478291&r1=1478290&r2=1478291&view=diff
==============================================================================
--- 
cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
 (original)
+++ 
cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
 Thu May  2 07:27:29 2013
@@ -671,7 +671,13 @@ public abstract class AbstractCodegenMoh
             jar.createArchive();
 
             cmd.createArg().setValue("-jar");
-            cmd.createArg().setValue(file.getAbsolutePath());
+            
+            String tmpFilePath = file.getAbsolutePath();
+            if (tmpFilePath.contains(" ")) {
+                //ensure the path is in double quotation marks if the path 
contain space
+                tmpFilePath = "\"" + tmpFilePath + "\"";
+            }
+            cmd.createArg().setValue(tmpFilePath);
 
         } catch (Exception e1) {
             throw new MojoExecutionException("Could not create runtime jar", 
e1);


Reply via email to