You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2024/01/11 12:01:06 UTC

(camel-k) branch main updated: fix(#5047): Update Quarkus service discovery setting for data type transformer

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

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


The following commit(s) were added to refs/heads/main by this push:
     new d0a27dd55 fix(#5047): Update Quarkus service discovery setting for data type transformer
d0a27dd55 is described below

commit d0a27dd5599c3d7ea518cac61b2bd530fb9e79e0
Author: Christoph Deppisch <cd...@redhat.com>
AuthorDate: Thu Jan 11 10:11:15 2024 +0100

    fix(#5047): Update Quarkus service discovery setting for data type transformer
    
    - Make sure to support factory finder service discovery resource paths for data type transformers in different Camel runtimes
    - Enables Pipes to use data type transformers that get resolved during runtime with service discovery
    - Camel 3.x uses 'META-INF/services/org/apache/camel/datatype/converter/*'
    - Camel 4.0 uses `META-INF/services/org/apache/camel/datatype/transformer/*`
    - Camel 4.2 uses `META-INF/services/org/apache/camel/transformer/*`
---
 pkg/builder/quarkus.go                   | 5 +++--
 script/camel-k-runtime-archetype/pom.xml | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pkg/builder/quarkus.go b/pkg/builder/quarkus.go
index 4159f9931..6d5f7f8ea 100644
--- a/pkg/builder/quarkus.go
+++ b/pkg/builder/quarkus.go
@@ -178,8 +178,9 @@ func GenerateQuarkusProjectCommon(runtimeVersion string, quarkusVersion string,
 	// proxies which in some case may fail.
 	buildProperties["quarkus.camel.routes-discovery.enabled"] = "false"
 
-	// required for Kamelets utils to resolve data type converters at runtime
-	buildProperties["quarkus.camel.service.discovery.include-patterns"] = "META-INF/services/org/apache/camel/datatype/converter/*"
+	// required for to resolve data type transformers at runtime with service discovery
+	// the different Camel runtimes use different resource paths for the service lookup
+	buildProperties["quarkus.camel.service.discovery.include-patterns"] = "META-INF/services/org/apache/camel/datatype/converter/*,META-INF/services/org/apache/camel/datatype/transformer/*,META-INF/services/org/apache/camel/transformer/*"
 
 	// copy all user defined quarkus.camel build time properties to the quarkus-maven-plugin build properties
 	for key, value := range buildTimeProperties {
diff --git a/script/camel-k-runtime-archetype/pom.xml b/script/camel-k-runtime-archetype/pom.xml
index 7d58690cd..b1558bdc0 100644
--- a/script/camel-k-runtime-archetype/pom.xml
+++ b/script/camel-k-runtime-archetype/pom.xml
@@ -67,7 +67,7 @@
               <properties>
                 <quarkus.banner.enabled>false</quarkus.banner.enabled>
                 <quarkus.camel.routes-discovery.enabled>false</quarkus.camel.routes-discovery.enabled>
-                <quarkus.camel.service.discovery.include-patterns>META-INF/services/org/apache/camel/datatype/converter/*</quarkus.camel.service.discovery.include-patterns>
+                <quarkus.camel.service.discovery.include-patterns>META-INF/services/org/apache/camel/datatype/converter/*,META-INF/services/org/apache/camel/datatype/transformer/*,META-INF/services/org/apache/camel/transformer/*</quarkus.camel.service.discovery.include-patterns>
               </properties>
             </configuration>
           </execution>
@@ -120,4 +120,4 @@
     </plugins>
     <extensions></extensions>
   </build>
-</project>
\ No newline at end of file
+</project>