Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1264117E9F for ; Wed, 3 Jun 2015 00:52:42 +0000 (UTC) Received: (qmail 77177 invoked by uid 500); 2 Jun 2015 20:52:42 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 77117 invoked by uid 500); 2 Jun 2015 20:52:42 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 77108 invoked by uid 99); 2 Jun 2015 20:52:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2015 20:52:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CF7ADFBDB; Tue, 2 Jun 2015 20:52:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Message-Id: <8a0545f1ca38458eb4ef6c12bbd87b7f@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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, 2 Jun 2015 20:52:42 +0000 (UTC) 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 Authored: Tue Jun 2 16:51:34 2015 -0400 Committer: Daniel Kulp 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); + } } - } } }