cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: [CXF-6420] Update wsdl attachment to use the wsdlname to allow attaching multiple wsdls Patch from Andreas Panagiotidis applied with modifications for compatibility
Date Tue, 02 Jun 2015 20:52:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6ab6ead98 -> 907adf94a


[CXF-6420] Update wsdl attachment to use the wsdlname to allow attaching multiple wsdls
Patch from Andreas Panagiotidis applied with modifications for compatibility


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/907adf94
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/907adf94
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/907adf94

Branch: refs/heads/master
Commit: 907adf94a8cc01aac1f564baa08b8b84b0bf11df
Parents: 6ab6ead
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Jun 2 16:51:34 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Jun 2 16:51:34 2015 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/maven_plugin/Java2WSMojo.java  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/907adf94/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
----------------------------------------------------------------------
diff --git a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
index 06c2433..f819aa4 100644
--- a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
+++ b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
@@ -434,11 +434,23 @@ public class Java2WSMojo extends AbstractMojo {
             File wsdlFile = new File(outputFile);
             if (wsdlFile.exists()) {
                 if (classifier != null) {
-                    projectHelper.attachArtifact(project, "wsdl", classifier, wsdlFile);
+                    projectHelper.attachArtifact(project, wsdlFile.getName(), classifier,
wsdlFile);
                 } else {
-                    projectHelper.attachArtifact(project, "wsdl", wsdlFile);
+                    projectHelper.attachArtifact(project, wsdlFile.getName(), wsdlFile);
+                }
+                boolean hasWsdlAttached = false;
+                for (Artifact a : project.getAttachedArtifacts()) {
+                    if ("wsdl".equals(a.getType())) {
+                        hasWsdlAttached = true;
+                    }
+                }
+                if (!hasWsdlAttached) {
+                    if (classifier != null) {
+                        projectHelper.attachArtifact(project, "wsdl", classifier, wsdlFile);
+                    } else {
+                        projectHelper.attachArtifact(project, "wsdl", wsdlFile);
+                    }
                 }
-                
             }
         }
     }


Mime
View raw message