You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2013/05/02 09:35:47 UTC

svn commit: r1478294 - in /cxf/branches/2.7.x-fixes: ./ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Author: ffang
Date: Thu May  2 07:35:47 2013
New Revision: 1478294

URL: http://svn.apache.org/r1478294
Log:
Merged revisions 1478291 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1478291 | ffang | 2013-05-02 15:27:29 +0800 (四, 02  5 2013) | 1 line
  
  [CXF-4982]Codegen maven plugin fails forked execution on Windows when default tmp dir contain space
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1478291

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1478294&r1=1478293&r2=1478294&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java (original)
+++ cxf/branches/2.7.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Thu May  2 07:35:47 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);