[
https://issues.apache.org/jira/browse/CXF-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495816#comment-17495816
]
Andriy Redko commented on CXF-8661:
-----------------------------------
Hi [~dnl] ,
> should the missing {{jakarta.xml.ws:jakarta.xml.ws-api}} and
> {{jakarta.annotation:jakarta.annotation-api}} dependencies?
With respect to {{{}jakarta.xml.{}}}{{{}ws-api{}}} depends on JDK: for JDK-8 -
no (it is part of it), for JDK-9 and above - yes, for
{{{}jakarta.annotation-api{}}}- I believe it is almost always needed and comes
along with {{cxf-frontend-xxx}} module(s) (the {{cxf-core}} is not very useful
by itself).
> Feels a bit weird because consumers would then have to know a lot about the
> inner workings of CXF to decide which dependencies are needed additionally
> for CXF core to work properly.
Sticking to the JDK-8 baseline has such limits, the dependencies you run into
are among typical hurdles of migration from JDK-8 to JDK-11/17, the 3.5.x is
the last branch targeting JDK-8, hopefully 3.6.x will make things easier.
> if core uses classes from jakarta.xml.ws:jakarta.xml.ws-api this dependency
> should be provided as optional
See please my comment from above (JDK-8 vs JDK-9+ +
{{{}jakarta.xml.{}}}{{{}ws-api{}}}), plus optional would not solve the problem
anyhow, the dependencies have to be added manually.
> JAX WS Compile Dependency missing
> ---------------------------------
>
> Key: CXF-8661
> URL: https://issues.apache.org/jira/browse/CXF-8661
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.5.0, 3.4.5
> Environment: * CXF Core 3.4.5
> * Tomcat 9.0.45
> * Oracle JDK 11.0.13
> * Spring 5.2.15.RELEASE
> Reporter: Daniel Meier
> Priority: Major
>
> The {{org.apache.cxf.feature.AbstractFeature}} class in CXF Core extends the
> {{WebServiceFeature}} of the JAX WS API. The CXF Core Artifact does not
> declare it as a Compile Dependency though (see [Maven
> Central|https://mvnrepository.com/artifact/org.apache.cxf/cxf-core/3.5.0]).
> This leads to a {{NoClassDefFoundError}} in a Spring Application using XML
> Configuration in a Java 11 environment, since the
> {{org.apache.cxf.bus.spring.NamespaceHandler}} imports
> {{org.apache.cxf.feature.LoggingFeature}}, an {{AbstractFeature}}
> implementation.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)