Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 6b7631060 -> 70837021f
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/1d8b0674 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1d8b0674 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1d8b0674 Branch: refs/heads/3.1.x-fixes Commit: 1d8b06748b972b5c7b917f31d0cf66bc4f81f139 Parents: 6b76310 Author: Eivind Bergstøl <eiv...@bergstol.no> Authored: Tue Jun 28 10:55:51 2016 +0200 Committer: Daniel Kulp <dk...@apache.org> Committed: Thu Mar 23 08:40:27 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/1d8b0674/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 fe589da..c6b28ec 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; } }