Skip to content

Commit

Permalink
fix(#5047): Update Quarkus service discovery setting for data type tr…
Browse files Browse the repository at this point in the history
…ansformer

- 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/*`
  • Loading branch information
christophd authored and squakez committed Jan 11, 2024
1 parent 2eb5fdc commit d0a27dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/builder/quarkus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions script/camel-k-runtime-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -120,4 +120,4 @@
</plugins>
<extensions></extensions>
</build>
</project>
</project>

0 comments on commit d0a27dd

Please sign in to comment.