cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf-xjc-utils git commit: Fix tests on windows in non-forked mode.
Date Wed, 12 Nov 2014 15:06:20 GMT
Repository: cxf-xjc-utils
Updated Branches:
  refs/heads/master 8d5b44460 -> 1747a9cbc


Fix tests on windows in non-forked mode.


Project: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/commit/1747a9cb
Tree: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/tree/1747a9cb
Diff: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/diff/1747a9cb

Branch: refs/heads/master
Commit: 1747a9cbc21f85b65da08b78b6bfbc08fd80420d
Parents: 8d5b444
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Nov 12 10:05:53 2014 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Nov 12 10:05:53 2014 -0500

----------------------------------------------------------------------
 .../cxf/maven_plugin/XSDToJavaRunner.java       | 25 +++++++++++---------
 1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/blob/1747a9cb/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java
----------------------------------------------------------------------
diff --git a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java
b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java
index 69fab41..f0c8838 100644
--- a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java
+++ b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java
@@ -104,6 +104,17 @@ public class XSDToJavaRunner {
                 urls.add(file.toURI().toURL());
             }
         }
+        for (int x = 0; x < args.length; x++) {
+            if ("-classpath".equals(args[x])) {
+                File file = getFile(args[x + 1], listener);
+                if (file != null && file.exists()) {
+                    cpList.add(file.getAbsolutePath());
+                    urls.add(file.getAbsoluteFile().toURI().toURL());
+                }
+                x++;
+            }
+        }
+
         final ClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]),

                                                       this.getClass().getClassLoader());
         
@@ -147,6 +158,9 @@ public class XSDToJavaRunner {
                 catResolver.getCatalog().parseCatalog(catalogFile.getPath());
             }
         };
+        for (URL url : urls) {
+            opt.classpaths.add(url);
+        }
         if (checkXmlElementRef()) {
             opt.target = SpecVersion.V2_1;
         }
@@ -345,17 +359,6 @@ public class XSDToJavaRunner {
         XJCErrorListener listener = new XJCErrorListener(context);
 
         List<String> cplist = new ArrayList<String>();
-        for (int x = 0; x < args.length; x++) {
-            if ("-classpath".equals(args[x])) {
-                cplist.add(args[x + 1]);
-                File file = getFile(args[x + 1], listener);
-                if (file != null && file.exists()) {
-                    args[x + 1] = file.getAbsolutePath();
-                }
-                x++;
-            }
-        }
-
         
         File outputFile = getFile(args[args.length - 1], listener);
         if (outputFile == null) {


Mime
View raw message