You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2007/05/10 04:20:52 UTC

svn commit: r536733 - /incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java

Author: mmao
Date: Wed May  9 19:20:51 2007
New Revision: 536733

URL: http://svn.apache.org/viewvc?view=rev&rev=536733
Log:
CXF-639 Apply patch  'Maven codegen plugin fails for cxf wsdl urls' contributed by Chris Mosel


Modified:
    incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java

Modified: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?view=diff&rev=536733&r1=536732&r2=536733
==============================================================================
--- incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original)
+++ incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Wed May  9 19:20:51 2007
@@ -126,7 +126,9 @@
                              File outputDirFile,
                              long cgtimestamp) throws MojoExecutionException {
         File file = new File(wsdlOption.getWsdl());
-        File doneFile = new File(outputDirFile, "." + file.getName() + ".DONE");
+        // If URL to WSDL, replace ? and & since they're invalid chars for file names
+        File doneFile =
+            new File(outputDirFile, "." + file.getName().replace('?', '_').replace('&', '_') + ".DONE");
         boolean doWork = cgtimestamp > doneFile.lastModified();
         if (!doneFile.exists()) {
             doWork = true;