cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/5] cxf git commit: CXF-6942 - Fix to resolve problem finding wsdl with classifier When using <attachWsdl>true<attachWsdl> when generating a wsdl an ealier fix added the classifier to the artifact. This classifier is not used correctly by cxf-codegen-p
Date Thu, 23 Mar 2017 12:37:39 GMT
CXF-6942 - Fix to resolve problem finding wsdl with classifier
When using <attachWsdl>true<attachWsdl> when generating a wsdl
an ealier fix added the classifier to the artifact. This
classifier is not used correctly by cxf-codegen-plugin when
<wsdlArtifact> is used to locate the wsdl-file. This fix adds
an extra check to see if an artifact with exists with type
containing the classifier.
This closes #144


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

Branch: refs/heads/master
Commit: 75aecf314bda22ec294088a62e60e5a0bb1cbb7e
Parents: 64070aa
Author: Eivind Bergstøl <eivind@bergstol.no>
Authored: Tue Jun 28 10:55:51 2016 +0200
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 23 08:31:07 2017 -0400

----------------------------------------------------------------------
 .../apache/cxf/maven_plugin/AbstractCodegenMoho.java   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/75aecf31/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
----------------------------------------------------------------------
diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
index fb8dc94..9e4fc30 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
@@ -871,11 +871,14 @@ public abstract class AbstractCodegenMoho extends AbstractMojo {
         if (artifactSet != null && !artifactSet.isEmpty()) {
             for (Artifact pArtifact : artifactSet) {
                 if (targetArtifact.getGroupId().equals(pArtifact.getGroupId())
-                    && targetArtifact.getArtifactId().equals(pArtifact.getArtifactId())
-                    && targetArtifact.getVersion().equals(pArtifact.getVersion())
-                    && "wsdl".equals(pArtifact.getType())) {
-                    getLog().info(String.format("%s resolved to %s", pArtifact.toString(),
pArtifact
-                                      .getFile().getAbsolutePath()));
+                        && targetArtifact.getArtifactId().equals(pArtifact.getArtifactId())
+                        && targetArtifact.getVersion().equals(pArtifact.getVersion())

+                        && ("wsdl".equals(pArtifact.getType()) 
+                        || (
+                                targetArtifact.getClassifier() != null
+                                        && pArtifact.getType() != null
+                                        && (targetArtifact.getClassifier() + ".wsdl").equals(pArtifact.getType())
+                        ))) {
                     return pArtifact;
                 }
             }


Mime
View raw message