cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r604006 - in /incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin: WSDL2JavaMojo.java WsdlOption.java
Date Thu, 13 Dec 2007 19:51:21 GMT
Author: dkulp
Date: Thu Dec 13 11:51:19 2007
New Revision: 604006

URL: http://svn.apache.org/viewvc?rev=604006&view=rev
Log:
Merge part of r603819

Modified:
    incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java

Modified: incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=604006&r1=604005&r2=604006&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Thu Dec 13 11:51:19 2007
@@ -24,6 +24,7 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
@@ -95,13 +96,23 @@
         classesDir.mkdirs();
 
 
-        if (wsdlOptions == null) {
-            List<WsdlOption> options = new WsdlOptionLoader().load(wsdlRoot);
-            wsdlOptions = options.toArray(new WsdlOption[options.size()]);
-            if (wsdlOptions == null) {
-                getLog().info("Nothing to generate");
-                return;
+        if (wsdlRoot != null) {
+            List<WsdlOption> options = new ArrayList<WsdlOption>();
+            if (wsdlOptions != null) {
+                options.addAll(Arrays.asList(wsdlOptions));
+            }
+            
+            for (WsdlOption o : new WsdlOptionLoader().load(wsdlRoot)) {
+                if (!options.contains(o)) {
+                    options.add(o);
+                }
             }
+            wsdlOptions = options.toArray(new WsdlOption[options.size()]);
+        }
+
+        if (wsdlOptions == null) {
+            getLog().info("Nothing to generate");
+            return;
         }
 
         List<URL> urlList = new ArrayList<URL>();

Modified: incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=604006&r1=604005&r2=604006&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
Thu Dec 13 11:51:19 2007
@@ -65,4 +65,20 @@
     public File[] getDeleteDirs() {
         return redundantDirs;
     }
+    
+    public int hashCode() {
+        if (wsdl != null) {
+            return wsdl.hashCode();
+        }
+        return -1;
+    }
+
+    public boolean equals(Object obj) {
+        if (!(obj instanceof WsdlOption)) {
+            return false;
+        }
+        
+        WsdlOption t = (WsdlOption) obj;
+        return t.getWsdl().equals(getWsdl());
+    }
 }



Mime
View raw message