This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 6c3110c4277f47f6854734182be1ece4a2a2f623 Author: Daniel Kulp <[email protected]> AuthorDate: Mon Dec 12 14:24:58 2022 -0500 Add some profiles to test basic non-servlet/spring-boot use cases with spring5. Fix test cxf-core with spring5 --- .../cxf/bus/spring/Jsr250BeanPostProcessor.java | 5 +++-- distribution/src/main/release/samples/pom.xml | 26 +++++++++++++++++++++- parent/pom.xml | 10 +++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java b/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java index 1fb0746eb8..f429d3de1f 100644 --- a/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java +++ b/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java @@ -22,6 +22,7 @@ package org.apache.cxf.bus.spring; import org.apache.cxf.Bus; +import org.apache.cxf.common.classloader.ClassLoaderUtils; import org.apache.cxf.common.injection.ResourceInjector; import org.apache.cxf.resource.ResourceManager; import org.springframework.beans.factory.NoSuchBeanDefinitionException; @@ -46,8 +47,8 @@ public class Jsr250BeanPostProcessor public void setApplicationContext(ApplicationContext applicationContext) { context = applicationContext; try { - Class<?> cls = Class - .forName("org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"); + Class<?> cls = ClassLoaderUtils.loadClass("org.springframework.context.annotation.CommonAnnotationBeanPostProcessor", + applicationContext.getClass()); isProcessing = context.getBeanNamesForType(cls, true, false).length == 0; } catch (ClassNotFoundException e) { isProcessing = true; diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml index b346de9898..eb7723ba69 100644 --- a/distribution/src/main/release/samples/pom.xml +++ b/distribution/src/main/release/samples/pom.xml @@ -300,7 +300,31 @@ </pluginRepository> </pluginRepositories> </profile> - + <profile> + <id>jdk11</id> + <activation> + <jdk>[11,16)</jdk> + </activation> + <properties> + <cxf.spring.boot.version>2.7.6</cxf.spring.boot.version> + <cxf.spring.version>5.3.24</cxf.spring.version> + <spring.boot.version>2.7.6</spring.boot.version> + </properties> + <repositories> + <repository> + <id>spring.milestone</id> + <url>https://repo.spring.io/milestone/</url> + <name>Spring Milestone Repo</name> + </repository> + <repository> + <id>netflix.candidates</id> + <url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + </profile> </profiles> <!-- we turn off the deploy in the properties above, but deploy plugin will diff --git a/parent/pom.xml b/parent/pom.xml index 20b0d1f23a..1abefb7e2b 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -2133,6 +2133,16 @@ </plugins> </build> </profile> + <profile> + <id>jdk11</id> + <activation> + <jdk>[11,16)</jdk> + </activation> + <properties> + <cxf.spring.boot.version>2.7.6</cxf.spring.boot.version> + <cxf.spring.version>5.3.24</cxf.spring.version> + </properties> + </profile> <profile> <id>jdk13</id> <activation>
