[ 
https://issues.apache.org/jira/browse/CXF-6942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351838#comment-15351838
 ] 

Eivind Bergtøl edited comment on CXF-6942 at 6/27/16 9:21 PM:
--------------------------------------------------------------

I have the same problem (maven 3.3.9). I have been trying to publish wsdl-files 
to nexus and only depend on the wsdl (wsdl first). At first I had problems with 
multiple wsdl-files in the same pom leaving only the first generated wsdl in 
the repository. This is fixed in CXF-6420. However this fix uses the classifier 
and it seams that, at least version 3.6.1 can't handle the classifier.
The problem as it seams is that maven needs a dependency with 
```Classifier.wsdl``` as type instead of ```wsdl``` and classifier in 
classifier tag.

Not Working:

<dependency>
            <groupId>my.group</groupId>
            <artifactId>webservices</artifactId>
            <version>0-SNAPSHOT</version>
            <type>wsdl</type>
            <classifier>MyService</classifier>
</dependency>

Working:
<dependency>
            <groupId>my.groupl</groupId>
            <artifactId>webservices</artifactId>
            <version>0-SNAPSHOT</version>
            <type>MyService.wsdl</type>
</dependency>

The problem is then that AbstractCodegenMoho that is checking for the 
dependencies only checks for "wsdl".equals(pArtifact.getType()) and ignoring 
classifier.

So either fix the dependency module, or have AbstractCodegenMoho check for 
pArtifact.getClassifier()+".wsdl").equals(pArtifact.getType()) in addition to 
the checks that are there now.


was (Author: eivinhb):
I have the same problem (maven 3.3.9). I have been trying to publish wsdl-files 
to nexus and only depend on the wsdl (wsdl first). At first I had problems with 
multiple wsdl-files in the same pom leaving only the first generated wsdl in 
the repository. This is fixed in CXF-6420. However this fix uses the classifier 
and it seams that, at least version 3.6.1 can't handle the classifier.
The problem as it seams is that maven needs a dependency with 
```Classifier.wsdl``` as type instead of ```wsdl``` and classifier in 
classifier tag.

Not Working:
```
<dependency>
            <groupId>my.group</groupId>
            <artifactId>webservices</artifactId>
            <version>0-SNAPSHOT</version>
            <type>wsdl</type>
            <classifier>MyService</classifier>
</dependency>
```
Working:
```
<dependency>
            <groupId>my.groupl</groupId>
            <artifactId>webservices</artifactId>
            <version>0-SNAPSHOT</version>
            <type>MyService.wsdl</type>
</dependency>
````

The problem is then that AbstractCodegenMoho that is checking for the 
dependencies only checks for ```"wsdl".equals(pArtifact.getType())``` and 
ignoring classifier.

So either fix the dependency module, or have AbstractCodegenMoho check for 
```pArtifact.getClassifier()+".wsdl").equals(pArtifact.getType())``` in 
addition to the checks that are there now.

> cxf-codegen-plugin wsdlArtifact failed to resolve WSDL
> ------------------------------------------------------
>
>                 Key: CXF-6942
>                 URL: https://issues.apache.org/jira/browse/CXF-6942
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Core
>    Affects Versions: 3.1.6
>            Reporter: Torkel Røisli
>             Fix For: 3.0.0-milestone1
>
>
> Failed to resolve WSDL artifact no.xxx:artifactId-wsdl:master-SNAPSHOT.
> <wsdlArtifact>
>   <groupId>no.xxx</groupId>
>   <artifactId>artifactId-wsdl</artifactId>
>   <version>master-SNAPSHOT</version>
> </wsdlArtifact>
> Verified to work ok with 3.0.0-milestone1, but failes with 3.1.6.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to