This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git
commit de6407150237eb42f18f6cf7e35442ed17fa868b Author: Jean-Louis Monteiro <jlmonte...@tomitribe.com> AuthorDate: Sat Mar 26 11:55:04 2022 +0100 TOMEE-3880 Split out CXF REST Client from CXF Shade --- .../pom.xml | 196 +-------------------- deps/cxf-shade/pom.xml | 26 --- deps/pom.xml | 1 + tomee/tomee-microprofile/mp-common/pom.xml | 22 +-- .../microprofile/TomEEMicroProfileListener.java | 3 +- 5 files changed, 13 insertions(+), 235 deletions(-) diff --git a/deps/cxf-shade/pom.xml b/deps/cxf-rt-rs-mp-client-shade/pom.xml similarity index 55% copy from deps/cxf-shade/pom.xml copy to deps/cxf-rt-rs-mp-client-shade/pom.xml index 87c1f4c..870bdf3 100644 --- a/deps/cxf-shade/pom.xml +++ b/deps/cxf-rt-rs-mp-client-shade/pom.xml @@ -24,8 +24,8 @@ </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-shade</artifactId> - <name>TomEE :: Deps :: CXF Shade</name> + <artifactId>cxf-rt-rs-mp-client-shade</artifactId> + <name>TomEE :: Deps :: CXF Rest Client Shade</name> <!-- This is to make sure ApplicationComposer, EJBContainer, Arquillian can work. @@ -38,59 +38,13 @@ <dependencies> <dependency> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-core</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-databinding-jaxb</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxrs</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> + <artifactId>cxf-rt-rs-mp-client</artifactId> <version>${cxf.version}</version> - <!-- <exclusions> <exclusion> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-ws-addr</artifactId> + <artifactId>*</artifactId> </exclusion> - </exclusions> - --> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-management</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-client</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-extension-providers</artifactId> - <version>${cxf.version}</version> - </dependency> - <!-- - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-extension-search</artifactId> - <version>${cxf.version}</version> - </dependency> - --> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-mp-client</artifactId> - <version>${cxf.version}</version> - <exclusions> <exclusion> <groupId>org.eclipse.microprofile.rest.client</groupId> <artifactId>microprofile-rest-client-api</artifactId> @@ -101,63 +55,13 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-security-cors</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-security-oauth2</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-sse</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-ws-security</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-wsdl</artifactId> - <version>${cxf.version}</version> - </dependency> - <!-- add transitive dependencies so including this is equivalent to including regular deps --> - <dependency> - <groupId>org.apache.ws.xmlschema</groupId> - <artifactId>xmlschema-core</artifactId> - <version>2.2.5</version> - </dependency> <dependency> - <groupId>com.fasterxml.woodstox</groupId> - <artifactId>woodstox-core</artifactId> - <version>6.2.8</version> - </dependency> - <dependency> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - <version>1.6.3</version> - </dependency> - <dependency> - <groupId>org.reactivestreams</groupId> - <artifactId>reactive-streams</artifactId> - <version>1.0.3</version> + <groupId>org.apache.tomee</groupId> + <artifactId>cxf-shade</artifactId> + <version>${project.version}</version> </dependency> + <dependency> <groupId>org.apache.tomee</groupId> <artifactId>microprofile-rest-client-api-shade</artifactId> @@ -169,18 +73,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.neethi</groupId> - <artifactId>neethi</artifactId> - <version>3.0.3</version> - </dependency> - - <!-- is this required --> - <dependency> - <groupId>com.sun.xml.messaging.saaj</groupId> - <artifactId>saaj-impl</artifactId> - <version>1.5.3</version> - </dependency> </dependencies> @@ -188,41 +80,6 @@ <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>3.1.2</version> - <executions> - <execution> - <id>copy-dependencies-for-classpath</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/patch-classpath</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>false</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - <execution> - <id>copy-dependencies-for-patching</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>false</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - <excludeTransitive>true</excludeTransitive> <!-- we just want to patch and shade CXF --> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.4</version> <executions> @@ -238,7 +95,7 @@ <promoteTransitiveDependencies>true</promoteTransitiveDependencies> <artifactSet> <includes> - <include>org.apache.cxf:*</include> <!-- only CXF to make sure we don't add other things --> + <include>org.apache.cxf:cxf-rt-rs-mp-client</include> <!-- only CXF to make sure we don't add other things --> </includes> </artifactSet> <transformers> @@ -358,41 +215,6 @@ </executions> </plugin> - <plugin> - <groupId>org.apache.tomee.patch</groupId> - <artifactId>tomee-patch-plugin</artifactId> - <configuration> - <select>cxf-shade-.*\.jar</select> - <transformSources>false</transformSources> - <source>1.8</source> - <target>1.8</target> - <dependencies> - <dependency>${project.groupId}:jakartaee-api:jar:9.1-M2-SNAPSHOT</dependency> - - <dependency>org.apache.aries.blueprint:blueprint-parser:jar:1.6.0</dependency> - <dependency>org.apache.aries.blueprint:org.apache.aries.blueprint.api:jar:1.0.1</dependency> - <dependency>org.apache.aries.blueprint:org.apache.aries.blueprint.core:jar:1.10.2</dependency> - <dependency>org.apache.tomcat:tomcat-servlet-api:jar:10.0.4</dependency> - <dependency>org.osgi:org.osgi.core:jar:6.0.0</dependency> - <dependency>org.osgi:osgi.cmpn:jar:6.0.0</dependency> - <dependency>org.ow2.asm:asm:jar:9.1</dependency> - <dependency>org.springframework:spring-aop:jar:5.3.6</dependency> - <dependency>org.springframework:spring-beans:jar:5.3.6</dependency> - <dependency>org.springframework:spring-context:jar:5.3.6</dependency> - <dependency>org.springframework:spring-core:jar:5.3.6</dependency> - <dependency>org.springframework:spring-webmvc:jar:5.3.6</dependency> - </dependencies> - </configuration> - <executions> - <execution> - <goals> - <goal>run</goal> - </goals> - <phase>package</phase> - </execution> - </executions> - </plugin> - </plugins> </build> </project> diff --git a/deps/cxf-shade/pom.xml b/deps/cxf-shade/pom.xml index 87c1f4c..20fdee9 100644 --- a/deps/cxf-shade/pom.xml +++ b/deps/cxf-shade/pom.xml @@ -88,21 +88,6 @@ --> <dependency> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-mp-client</artifactId> - <version>${cxf.version}</version> - <exclusions> - <exclusion> - <groupId>org.eclipse.microprofile.rest.client</groupId> - <artifactId>microprofile-rest-client-api</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.json</groupId> - <artifactId>jakarta.json-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-security-cors</artifactId> <version>${cxf.version}</version> </dependency> @@ -159,17 +144,6 @@ <version>1.0.3</version> </dependency> <dependency> - <groupId>org.apache.tomee</groupId> - <artifactId>microprofile-rest-client-api-shade</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>org.eclipse.microprofile.rest.client</groupId> - <artifactId>microprofile-rest-client-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.apache.neethi</groupId> <artifactId>neethi</artifactId> <version>3.0.3</version> diff --git a/deps/pom.xml b/deps/pom.xml index 58b2361..118fa1c 100644 --- a/deps/pom.xml +++ b/deps/pom.xml @@ -30,6 +30,7 @@ <modules> <module>taglibs-shade</module> <module>cxf-shade</module> + <module>cxf-rt-rs-mp-client-shade</module> <module>sxc-shade</module> <module>activemq-broker-shade</module> <module>activemq-client-shade</module> diff --git a/tomee/tomee-microprofile/mp-common/pom.xml b/tomee/tomee-microprofile/mp-common/pom.xml index d81508f..c7bdbda 100644 --- a/tomee/tomee-microprofile/mp-common/pom.xml +++ b/tomee/tomee-microprofile/mp-common/pom.xml @@ -204,29 +204,9 @@ <dependency> <groupId>org.apache.tomee</groupId> - <artifactId>cxf-shade</artifactId> + <artifactId>cxf-rt-rs-mp-client-shade</artifactId> <version>${project.version}</version> <exclusions> - <exclusion> - <groupId>org.glassfish.jaxb</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.json</groupId> - <artifactId>jakarta.json-api</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.ws.rs</groupId> - <artifactId>*</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.annotation</groupId> - <artifactId>jakarta.annotation-api</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.activation</groupId> - <artifactId>jakarta.activation-api</artifactId> - </exclusion> <!-- exclude in favor of cxf-shade --> <exclusion> <groupId>org.apache.cxf</groupId> diff --git a/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java index 209a9fb..cc36e57 100644 --- a/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java +++ b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java @@ -53,11 +53,12 @@ public class TomEEMicroProfileListener { "org.apache.geronimo.microprofile.metrics.cdi.MetricsExtension", "org.apache.geronimo.microprofile.opentracing.microprofile.cdi.OpenTracingExtension", "org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension", - // "org.apache.cxf.microprofile.client.cdi.RestClientExtension", + "org.apache.cxf.microprofile.client.cdi.RestClientExtension", }; @SuppressWarnings("Duplicates") public void enhanceScannableUrls(@Observes final EnhanceScannableUrlsEvent enhanceScannableUrlsEvent) { + final String mpScan = SystemInstance.get().getOptions().get("tomee.mp.scan", "none"); if (mpScan.equals("none")) {