This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 2ff3d6b789e46e89eb105389284ae2412df8c321 Author: opencode <[email protected]> AuthorDate: Fri Nov 6 12:10:29 2026 +0100 Remove the CXF optional module Drop modules/cxf and the JAX-RS support it provided. Update the CDI documentation, index and menu entry accordingly, and add a changelog entry. --- modules/cxf/.gitignore | 28 ---- modules/cxf/pom.xml | 185 --------------------- modules/cxf/src/main/java/tomcat/cxf/JsonBean.java | 28 ---- modules/cxf/src/main/resources/META-INF/beans.xml | 27 --- .../src/main/resources/META-INF/web-fragment.xml | 39 ----- webapps/docs/cdi.xml | 42 +---- webapps/docs/changelog.xml | 4 + webapps/docs/index.xml | 4 +- webapps/docs/project.xml | 2 +- 9 files changed, 11 insertions(+), 348 deletions(-) diff --git a/modules/cxf/.gitignore b/modules/cxf/.gitignore deleted file mode 100644 index 24e3407af6..0000000000 --- a/modules/cxf/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# ----------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ----------------------------------------------------------------------------- -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties - -# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored) -!/.mvn/wrapper/maven-wrapper.jar diff --git a/modules/cxf/pom.xml b/modules/cxf/pom.xml deleted file mode 100644 index 84bb6994dd..0000000000 --- a/modules/cxf/pom.xml +++ /dev/null @@ -1,185 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version - 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 Unless required by - applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for - the specific language governing permissions and limitations under the - License. ---> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache</groupId> - <artifactId>apache</artifactId> - <version>33</version> - </parent> - - <groupId>org.apache.tomcat</groupId> - <artifactId>tomcat-cxf</artifactId> - <name>Apache CXF for Apache Tomcat CDI</name> - <description>Apache CXF packaged for Apache Tomcat CDI</description> - <!-- This is the Apache CXF version --> - <version>4.1.9</version> - <packaging>jar</packaging> - - <properties> - <jakarta-enterprise-cdi.version>4.0.1</jakarta-enterprise-cdi.version> - <jakarta.json-api.version>2.1.3</jakarta.json-api.version> - <jakarta.json.bind-api.version>3.0.1</jakarta.json.bind-api.version> - <johnzon.version>2.0.2</johnzon.version> - </properties> - - <dependencies> - <dependency> - <groupId>jakarta.enterprise</groupId> - <artifactId>jakarta.enterprise.cdi-api</artifactId> - <version>${jakarta-enterprise-cdi.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>jakarta.json</groupId> - <artifactId>jakarta.json-api</artifactId> - <version>${jakarta.json-api.version}</version> - </dependency> - <dependency> - <groupId>jakarta.json.bind</groupId> - <artifactId>jakarta.json.bind-api</artifactId> - <version>${jakarta.json.bind-api.version}</version> - </dependency> - <!-- Apache CXF --> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-integration-cdi</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-client</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxrs</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-extension-providers</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-json-basic</artifactId> - <version>${project.version}</version> - </dependency> - <!-- Apache Johnzon --> - <dependency> - <groupId>org.apache.johnzon</groupId> - <artifactId>johnzon-jsonb</artifactId> - <version>${johnzon.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <!-- Build any extra classes for your custom Tomcat components if needed --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <release>21</release> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <createDependencyReducedPom>false</createDependencyReducedPom> - <transformers> - <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> - <resource>META-INF/cxf/bus-extensions.txt</resource> - </transformer> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <mainClass>${mainClass}</mainClass> - </transformer> - </transformers> - <artifactSet> - <excludes> - <!-- Already present in Tomcat or in the CDI bundle --> - <exclude>jakarta.activation:*</exclude> - <exclude>jakarta.annotation:jakarta.annotation-api</exclude> - <exclude>jakarta.el:*</exclude> - <exclude>jakarta.enterprise:jakarta.enterprise.cdi-api</exclude> - <exclude>jakarta.inject:*</exclude> - <exclude>jakarta.interceptor:*</exclude> - <!-- Exclude other unneeded dependencies --> - <exclude>org.apache.geronimo.specs:geronimo-jta_1.1_spec</exclude> - <exclude>org.apache.ant:*</exclude> - <exclude>org.codehaus.woodstox:*</exclude> - <exclude>org.glassfish.jaxb:*</exclude> - <exclude>org.jvnet.staxex:*</exclude> - <exclude>com.fasterxml.woodstox:*</exclude> - <exclude>com.sun.istack:*</exclude> - <exclude>com.sun.xml.*:*</exclude> - </excludes> - </artifactSet> - <filters> - <filter> - <artifact>org.apache.johnzon:johnzon-jsonb</artifact> - <excludes> - <exclude>META-INF/services/jakarta.enterprise.inject.spi.Extension</exclude> - </excludes> - </filter> - <filter> - <artifact>org.apache.cxf:cxf-integration-cdi</artifact> - <excludes> - <exclude>META-INF/beans.xml</exclude> - </excludes> - </filter> - <filter> - <artifact>*:*</artifact> - <excludes> - <exclude>META-INF/*.SF</exclude> - <exclude>META-INF/*.DSA</exclude> - <exclude>META-INF/*.RSA</exclude> - <exclude>META-INF/DEPENDENCIES</exclude> - <exclude>META-INF/LICENSE.md</exclude> - <exclude>META-INF/LICENSE.txt</exclude> - <exclude>META-INF/LICENSE</exclude> - <exclude>META-INF/MANIFEST.MF</exclude> - <exclude>META-INF/NOTICE.md</exclude> - <exclude>META-INF/NOTICE.txt</exclude> - <exclude>META-INF/NOTICE</exclude> - <!-- Unneeded configuration files --> - <exclude>module-info.class</exclude> - <exclude>META-INF/cxf/cxf.*</exclude> - <exclude>META-INF/cxf/cxf-servlet.*</exclude> - <exclude>META-INF/cxf/org.apache.cxf.bus.factory</exclude> - <exclude>META-INF/services/org.apache.cxf.bus.factory</exclude> - <exclude>META-INF/spring.*</exclude> - </excludes> - </filter> - </filters> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/modules/cxf/src/main/java/tomcat/cxf/JsonBean.java b/modules/cxf/src/main/java/tomcat/cxf/JsonBean.java deleted file mode 100644 index 019d48cf75..0000000000 --- a/modules/cxf/src/main/java/tomcat/cxf/JsonBean.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package tomcat.cxf; - -import jakarta.enterprise.context.Dependent; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.ext.Provider; - -import org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider; - -@Produces("application/json") -@Provider -@Dependent -public class JsonBean<T> extends JsonbJaxrsProvider<T> {} diff --git a/modules/cxf/src/main/resources/META-INF/beans.xml b/modules/cxf/src/main/resources/META-INF/beans.xml deleted file mode 100644 index e21852ff29..0000000000 --- a/modules/cxf/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd" - bean-discovery-mode="annotated" - version="4.0"> - <exclude name="com.*" /> - <exclude name="javax.*" /> - <exclude name="mozilla.*" /> - <exclude name="org.*" /> -</beans> diff --git a/modules/cxf/src/main/resources/META-INF/web-fragment.xml b/modules/cxf/src/main/resources/META-INF/web-fragment.xml deleted file mode 100644 index e55f6921bd..0000000000 --- a/modules/cxf/src/main/resources/META-INF/web-fragment.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<web-fragment xmlns="https://jakarta.ee/xml/ns/jakartaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee - https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" - version="6.0"> - <name>tomcat-cxf</name> - <ordering> - <before> - <others/> - </before> - </ordering> - <servlet> - <servlet-name>ApacheTomcatCXFServlet</servlet-name> - <display-name>Apache Tomcat CXF Servlet</display-name> - <servlet-class>org.apache.cxf.cdi.CXFCdiServlet</servlet-class> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>ApacheTomcatCXFServlet</servlet-name> - <url-pattern>/api/*</url-pattern> - </servlet-mapping> -</web-fragment> diff --git a/webapps/docs/cdi.xml b/webapps/docs/cdi.xml index 05983445c4..464f758127 100644 --- a/webapps/docs/cdi.xml +++ b/webapps/docs/cdi.xml @@ -23,7 +23,7 @@ &project; <properties> - <title>CDI, JAX-RS and dependent libraries support</title> + <title>CDI and dependent libraries support</title> </properties> <body> @@ -35,9 +35,9 @@ <section name="Introduction"> <p> - CDI and JAX-RS are dependencies for many other APIs and libraries. This - guide explains how to add support for them in Tomcat using two optional - modules that are provided in the Tomcat sources. + CDI is a dependency for many other APIs and libraries. This guide explains + how to add support for it in Tomcat using the optional module that is + provided in the Tomcat sources. </p> </section> @@ -76,39 +76,5 @@ mvn clean && mvn package]]></source> </section> - <section name="JAX-RS support"> - - <p> - JAX-RS support is provided by the <code>modules/cxf</code> optional module. - It packages the Apache CXF project and allows adding JAX-RS support - to individual webapps. The build process of the module uses Apache Maven, - and is not available as a binary bundle as it is built using a number of - publicly available JARs. The support depends on CDI support, which should - have previously been installed at either the container or webapp level. - </p> - - <p> - The process to build JAX-RS support is the following. - <source><![CDATA[cd $TOMCAT_SRC/modules/cxf -mvn clean && mvn package]]></source> - The resulting JAR at - <code>target/tomcat-cxf-x.y.z.jar</code> (where x.y.z depends on the - Apache CXF version used during the build) - should then be placed into the <code>/WEB-INF/lib</code> folder of the - desired web application. - </p> - - <p> - If the CDI support is available at the container - level, the JAR can also be placed in the Tomcat <code>lib</code> folder, - but in that case the CXF Servlet declaration must be individually added - in each webapp as needed (it is normally loaded by the web fragment that is - present in the JAR). The CXF Servlet class that should be used is - <code>org.apache.cxf.cdi.CXFCdiServlet</code> and should be mapped to the - desired root path where JAX-RS resources will be available. - </p> - - </section> - </body> </document> diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ed513aaf2e..96e7e6698e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -1678,6 +1678,10 @@ </subsection> <subsection name="Other"> <changelog> + <update> + Remove the <code>modules/cxf</code> optional module and the JAX-RS + support it provided. (remm) + </update> <update> Update Maven Resolver Ant Tasks to 1.6.1. (rjung) </update> diff --git a/webapps/docs/index.xml b/webapps/docs/index.xml index 95832a5ff9..573a882177 100644 --- a/webapps/docs/index.xml +++ b/webapps/docs/index.xml @@ -131,8 +131,8 @@ Apache Tomcat, and using many of the Apache Tomcat features.</p> Developing WebSocket applications for Apache Tomcat.</li> <li><a href="rewrite.html"><strong>URL rewrite</strong></a> - Using the regexp based rewrite valve for conditional URL and host rewrite.</li> -<li><a href="cdi.html"><strong>CDI and JAX-RS support</strong></a> - - Configuring CDI,JAX-RS and Eclipse Microprofile support.</li> +<li><a href="cdi.html"><strong>CDI support</strong></a> - + Configuring CDI and Eclipse MicroProfile support.</li> <li><a href="graal.html"><strong>AOT compilation support</strong></a> - Ahead of Time compilation support with GraalVM/Native Image.</li> </ol> diff --git a/webapps/docs/project.xml b/webapps/docs/project.xml index af744805f5..d1d83b3565 100644 --- a/webapps/docs/project.xml +++ b/webapps/docs/project.xml @@ -71,7 +71,7 @@ href="jdbc-pool.html"/> <item name="31) WebSocket" href="web-socket-howto.html"/> <item name="32) Rewrite" href="rewrite.html"/> - <item name="33) CDI 2 and JAX-RS" href="cdi.html"/> + <item name="33) CDI" href="cdi.html"/> <item name="34) AOT/GraalVM Support" href="graal.html"/> </menu> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
