This is an automated email from the ASF dual-hosted git repository.

fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 686e8c258dc Build core with JDK 17
686e8c258dc is described below

commit 686e8c258dc8b6f609fe53cd08c2ea4fa5fdea6a
Author: Croway <[email protected]>
AuthorDate: Tue Oct 14 14:09:32 2025 +0200

    Build core with JDK 17
---
 core/camel-spring-boot/pom.xml                     | 72 +++++++++++++++-------
 ...CamelVirtualThreadEnvironmentPostProcessor.java |  0
 .../src/main/resources/META-INF/spring.factories   |  3 -
 .../META-INF/spring.factories                      |  0
 4 files changed, 51 insertions(+), 24 deletions(-)

diff --git a/core/camel-spring-boot/pom.xml b/core/camel-spring-boot/pom.xml
index d6b7618e832..6a729d4b4af 100644
--- a/core/camel-spring-boot/pom.xml
+++ b/core/camel-spring-boot/pom.xml
@@ -272,45 +272,75 @@
             <activation>
                 <jdk>[21,)</jdk>
             </activation>
-            <properties>
-                <jdk.version>21</jdk.version>
-            </properties>
             <build>
                 <plugins>
-                    <!-- Add java21 test sources when using JDK 21+ -->
+                    <!-- Configure compiler for JDK 21 compatibility in this 
profile -->
                     <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>build-helper-maven-plugin</artifactId>
-                        <version>3.6.1</version>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>${maven-compiler-plugin-version}</version>
                         <executions>
                             <execution>
-                                <id>add-java21-test-sources</id>
-                                <phase>generate-test-sources</phase>
+                                <id>compile-java-21</id>
+                                <phase>compile</phase>
                                 <goals>
-                                    <goal>add-test-source</goal>
+                                    <goal>compile</goal>
                                 </goals>
                                 <configuration>
-                                    <sources>
-                                        
<source>${basedir}/src/test/java21</source>
-                                    </sources>
+                                    <release>21</release>
+                                    
<compileSourceRoots>${project.basedir}/src/main/java21</compileSourceRoots>
+                                    
<multiReleaseOutput>true</multiReleaseOutput>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>testCompile-java-21</id>
+                                <phase>test-compile</phase>
+                                <goals>
+                                    <goal>testCompile</goal>
+                                </goals>
+                                <configuration>
+                                    <release>21</release>
+                                    
<compileSourceRoots>${project.basedir}/src/test/java21</compileSourceRoots>
                                 </configuration>
                             </execution>
                         </executions>
                     </plugin>
-                    
-                    <!-- Configure compiler for JDK 21 compatibility in this 
profile -->
+
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <version>${maven-compiler-plugin-version}</version>
+                        <artifactId>maven-jar-plugin</artifactId>
                         <configuration>
-                            <source>21</source>
-                            <target>21</target>
-                            <fork>true</fork>
-                            <parameters>true</parameters>
+                            <archive>
+                                <manifestEntries>
+                                    <Multi-Release>true</Multi-Release>
+                                </manifestEntries>
+                            </archive>
                         </configuration>
                     </plugin>
 
+                    <!-- Add resources21 folder when building with JDK 21 -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-resources21</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            
<directory>${basedir}/src/main/resources21</directory>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
                     <!-- Configure surefire to run JDK 21 specific tests -->
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java
 
b/core/camel-spring-boot/src/main/java21/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java
similarity index 100%
rename from 
core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java
rename to 
core/camel-spring-boot/src/main/java21/org/apache/camel/spring/boot/CamelVirtualThreadEnvironmentPostProcessor.java
diff --git 
a/core/camel-spring-boot/src/main/resources/META-INF/spring.factories 
b/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
index e0a6e45de75..fa7a54b8349 100644
--- a/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
+++ b/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
@@ -14,6 +14,3 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-
-org.springframework.boot.env.EnvironmentPostProcessor=\
-org.apache.camel.spring.boot.CamelVirtualThreadEnvironmentPostProcessor
\ No newline at end of file
diff --git 
a/core/camel-spring-boot/src/main/resources/META-INF/spring.factories 
b/core/camel-spring-boot/src/main/resources21/META-INF/spring.factories
similarity index 100%
copy from core/camel-spring-boot/src/main/resources/META-INF/spring.factories
copy to core/camel-spring-boot/src/main/resources21/META-INF/spring.factories

Reply via email to