[CXF-7924]cxf-java2ws-plugin: Only one WSDL is generated and deployed per artifact.
@@ -510,6 +510,7 @@ public class Java2WSMojo extends AbstractMojo {
File wsdlFile = new File(outputFile);
if (wsdlFile.exists()) {
+
boolean hasWsdlAttached = false;
for (Artifact a : project.getAttachedArtifacts()) {
if ("wsdl".equals(a.getType()) && classifier != null && classifier.equals(a.getClassifier())) {
@@ -518,9 +519,9 @@ public class Java2WSMojo extends AbstractMojo {
}
if (!hasWsdlAttached) {
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);
}
}
}
