Skip to content

Commit

Permalink
Rework Kamelet build time code to avoid bytecode serialization issues
Browse files Browse the repository at this point in the history
Fixes #6831
  • Loading branch information
jamesnetherton committed Jan 10, 2025
1 parent df430f6 commit 39f0e08
Show file tree
Hide file tree
Showing 24 changed files with 285 additions and 746 deletions.
13 changes: 0 additions & 13 deletions catalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1813,19 +1813,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-tests-support-custom-kamelet-resource</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-tests-support-custom-log-component</artifactId>
Expand Down
24 changes: 24 additions & 0 deletions docs/modules/ROOT/pages/migration-guide/3.18.0.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= Camel Quarkus 3.18.0 Migration Guide

The following guide outlines how to adapt your code to changes that were made in Camel Quarkus 3.18.0.

== `camel-quarkus-yaml-dsl` is now required when using Kamelets with the Java DSL

When using Kamelets in conjunction with Java DSL routes, you must ensure `camel-quarkus-yaml-dsl` is added to the project dependencies.

[source,xml]
----
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-yaml-dsl</artifactId>
</dependency>
----

Failing to do this will result in a runtime exception like the following.

[source,shell]
----
java.lang.IllegalArgumentException: Cannot find RoutesBuilderLoader in classpath supporting file extension: kamelet.yaml
----

TIP: You can create Kamelets using Camel JBang, export them to a Camel Quarkus application and `camel-quarkus-yaml-dsl` will be added automatically.
1 change: 1 addition & 0 deletions docs/modules/ROOT/pages/migration-guide/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ We do frequent releases, a release almost every month, and even though we strive

Listed here are guides on how to migrate between major versions and anything of significance to watch for when upgrading from minor versions.

* xref:migration-guide/3.18.0.adoc[Camel Quarkus 3.17.x to Camel Quarkus 3.18.0 migration guide]
* xref:migration-guide/3.17.0.adoc[Camel Quarkus 3.16.x to Camel Quarkus 3.17.0 migration guide]
* xref:migration-guide/3.15.0.adoc[Camel Quarkus 3.14.x to Camel Quarkus 3.15.0 migration guide]
* xref:migration-guide/3.2.0.adoc[Camel Quarkus 2.x to Camel Quarkus 3.2.0 migration guide]
Expand Down
19 changes: 10 additions & 9 deletions docs/modules/ROOT/pages/reference/extensions/kamelet.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ endif::[]

[id="extensions-kamelet-usage"]
== Usage
[id="extensions-kamelet-usage-preloading-kamelets-at-build-time"]
=== Preloading Kamelets at build-time

This extension can preload a set of Kamelets at build time. You must include the names of each Kamelet, in the `quarkus.camel.kamelet.identifiers` configuration property.

[id="extensions-kamelet-usage-using-the-kamelet-catalog"]
=== Using the Kamelet Catalog

Expand All @@ -67,7 +62,10 @@ Alternatively, you can add the `camel-kamelets` dependency to your application.
</dependency>
----

You can select which Kamelets from the catalog you want to use by referencing their name in the `quarkus.camel.kamelet.identifiers` property.
[id="extensions-kamelet-usage-custom-kamelets"]
=== Custom Kamelets

It's advised to name files containing your custom Kamelet definitions with the extension `.kamelet.yaml`.


[id="extensions-kamelet-additional-camel-quarkus-configuration"]
Expand All @@ -80,11 +78,14 @@ You can select which Kamelets from the catalog you want to use by referencing th

|icon:lock[title=Fixed at build time] [[quarkus.camel.kamelet.identifiers]]`link:#quarkus.camel.kamelet.identifiers[quarkus.camel.kamelet.identifiers]`

List of kamelets identifiers to pre-load at build time.
Optional comma separated list of kamelet identifiers to configure for native mode support.
A kamelet identifier is the Kamelet file name without the .kamelet.yaml suffix.
<p>
Each individual identifier is used to set the related {@link org.apache.camel.model.RouteTemplateDefinition} id.
The default value '*' will result in all discovered Kamelet definition files being included into the native image.
Note that this configuration option is only relevant when producing a native application.
</p>
| List of `string`
|
| `*`
|===

[.configuration-legend]
Expand Down
4 changes: 0 additions & 4 deletions extensions/kamelet/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-kamelet</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-yaml-dsl</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit 39f0e08

Please sign in to comment.