You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2022/03/02 03:39:00 UTC

[jira] [Comment Edited] (CXF-8664) Goal wsdl2java of cxf-codegen-plugin:3.5.0 does not generate Java 17 complaint packages

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

Andriy Redko edited comment on CXF-8664 at 3/2/22, 3:38 AM:
------------------------------------------------------------

Hi [~mismail] , the behavior you are observing is correct, 3.5.x is still using `javax.**{*}`{*} namespace, the 4.x would be relying on Jakarta and use \{*}`{*}jakarta{*}.{*}**{*}{*}` ones, see please [1].It is coming from:
{noformat}
<dependency>
  <groupId>jakarta.jws</groupId>   
  <artifactId>jakarta.jws-api</artifactId>
  <version>2.1.0</version>    
</dependency> {noformat}
Thank you.

[1] https://issues.apache.org/jira/browse/CXF-8371


was (Author: reta):
Hi [~mismail] , the behavior you are observing is correct, 3.5.x is still using `javax.*` namespace, the 4.x would be relying on Jakarta and use `jakarta.*` ones, see please [1]. Thank you.

[1] https://issues.apache.org/jira/browse/CXF-8371

> Goal wsdl2java of cxf-codegen-plugin:3.5.0 does not generate Java 17 complaint packages
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-8664
>                 URL: https://issues.apache.org/jira/browse/CXF-8664
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 3.5.0
>         Environment: Env: Platform Java 17, Maven 3.8.1 for build
>            Reporter: Mohamed Ismail
>            Priority: Blocker
>         Attachments: Cxf-Java17 issue.PNG
>
>
> I am using CXF 3.5.0 which supports Java 17 as per documentation
> While generating Webservice resources using wsdl2java goal of cxf-codegen-plugin , it generates Java 8 based sources not Java 17.
> For example, WebService annotation refers javax.jws package which is removed from JDK 17 .
> It supposed to refer jakarta.jws from jakarta library of CXF complaint to Java 17
>  
> Below is the generate-resource configuration
> ?? <plugin>??
> ??                <groupId>org.apache.cxf</groupId>??
> ??                <artifactId>cxf-codegen-plugin</artifactId>??
> ??                <version>${apache.cxf.version}</version>??
> ??                <executions>??
> ??                    <execution>??
> ??                        <id>generate-sources</id>??
> ??                        <phase>generate-sources</phase>??
> ??                        <configuration>??
> ??                            <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>??
> ??                            <wsdlOptions>??
> ??                                <wsdlOption>??
> ??                                    <wsdl>${basedir}/src/main/resources/PrintLabel.wsdl??
> ??                                    </wsdl>??
> ??                                    <extraargs>??
> ??                                        <extraarg>-autoNameResolution</extraarg>??
> ??                                        <extraarg>-client</extraarg>??
> ??                                        <extraarg>-verbose</extraarg>??
> ??                                    </extraargs>??
> ??                                </wsdlOption>??
> ??                            </wsdlOptions>??
> ??                        </configuration>??
> ??                        <goals>??
> ??                            <goal>wsdl2java</goal>??
> ??                        </goals>??
> ??                    </execution>??
> ??                </executions>??
> ??                <dependencies>??
> ??                    <dependency>??
> ??                        <groupId>jakarta.jws</groupId>??
> ??                        <artifactId>jakarta.jws-api</artifactId>??
> ??                        <version>2.1.0</version>??
> ??                    </dependency>??
> ??                </dependencies>??
> ??            </plugin>??



--
This message was sent by Atlassian Jira
(v8.20.1#820001)