This is an automated email from the ASF dual-hosted git repository.
luigidemasi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kit.git
The following commit(s) were added to refs/heads/main by this push:
new 0f1a153e Fix destination-choice test assertions and formatting
0f1a153e is described below
commit 0f1a153eb55bb63001e81da71bbe3dbf6ba5ac4a
Author: Jinal Sarvaiya <[email protected]>
AuthorDate: Mon Nov 30 15:05:57 2026 +0000
Fix destination-choice test assertions and formatting
---
distribution.properties | 15 ++++++
docs/modules/ROOT/pages/migration.adoc | 7 +++
.../camel-brainstorm/guides/version-selection.md | 36 +++++++++++++++
.../main/resources/skills/camel-migrate/SKILL.md | 12 ++++-
.../camel-migrate/guides/migration-analysis.md | 18 ++++++++
.../camel/kit/config/TargetRuntimeProfileTest.java | 54 ++++++++++++++++++++++
.../generator/MigrationOperationsContractTest.java | 31 +++++++++++++
7 files changed, 172 insertions(+), 1 deletion(-)
diff --git a/distribution.properties b/distribution.properties
index 94c60a45..be2c16d6 100644
--- a/distribution.properties
+++ b/distribution.properties
@@ -49,6 +49,21 @@ quarkus.platform.4.14.7=3.27.4.1
spring.boot.4.22.1=4.1.1
spring.boot.4.18.4=3.5.16
+# ─── Red Hat Build of Apache Camel (Spring Boot) ───────────────────────────
+#
+# Red Hat Camel core and Spring Boot BOM have separate release streams and do
+# not always share the same version qualifier (Issue #51). Version selection
+# is BOM-first: query available com.redhat.camel.springboot.platform BOMs,
+# verify resolution, extract versions from starter parent POM, and verify the
+# catalog provider (org.apache.camel.springboot) is published separately.
+# Never select a Camel core version and assume a matching BOM exists.
+#
+# Verified example from Red Hat GA:
+# BOM:
com.redhat.camel.springboot.platform:camel-spring-boot-bom:4.14.4.redhat-00010
+# Camel core (from starter parent): 4.14.4.redhat-00008
+# Spring Boot (from starter parent): 3.5.11
+# Catalog:
org.apache.camel.springboot:camel-catalog-provider-springboot:4.14.4.redhat-00010
+
# ─── MCP Server Versions ───────────────────────────────────────────────────
camel.mcp.version=4.22.3
knowledge.mcp.group-id=io.github.luigidemasi
diff --git a/docs/modules/ROOT/pages/migration.adoc
b/docs/modules/ROOT/pages/migration.adoc
index 3e7015ca..f31762e1 100644
--- a/docs/modules/ROOT/pages/migration.adoc
+++ b/docs/modules/ROOT/pages/migration.adoc
@@ -71,6 +71,13 @@ The workflow runs `help:effective-pom` on the leaf module
and passes the output
`camel-kit target --migration --check-effective-pom <xml>`. It then checks the
xref:mcp.adoc#binding[required catalog].
A change to any profile field requires fresh evidence for the new selection.
+When migrating from Red Hat product sources (Fuse, Red Hat Build of Apache
Camel), you are responsible for verifying
+version compatibility of non-Camel ecosystem dependencies such as ActiveMQ
Classic, Artemis/AMQ, Apicurio and 3scale
+against the selected target Camel version. Direct migrations record these
dependencies as assumptions in the generated
+`MIGRATION.md` note; planned migrations create a `MIG-###` row in
`migration-analysis.md` with the detected dependency,
+its evidence and a validation requirement. Consult Red Hat product
compatibility matrices at
+https://access.redhat.com/ when selecting compatible versions.
+
[[run]]
== Run the migration
diff --git
a/kit/camel-kit-core/src/main/resources/skills/camel-brainstorm/guides/version-selection.md
b/kit/camel-kit-core/src/main/resources/skills/camel-brainstorm/guides/version-selection.md
index 308c05aa..ff05bae1 100644
---
a/kit/camel-kit-core/src/main/resources/skills/camel-brainstorm/guides/version-selection.md
+++
b/kit/camel-kit-core/src/main/resources/skills/camel-brainstorm/guides/version-selection.md
@@ -179,6 +179,42 @@ not supported by this distribution.
---
+## Red Hat Build of Apache Camel (BOM-First Selection)
+
+**When to use:** After the user selects Red Hat Build of Apache Camel on
Spring Boot as the migration destination.
+
+**Important:** Red Hat Camel core and Red Hat Camel Spring Boot BOM have
separate release streams. A Camel core version might exist, but the Spring Boot
BOM at that exact version might not. Always select from available BOM versions,
not Camel core versions (Issue #51).
+
+### Selection Process
+
+1. Query available
`com.redhat.camel.springboot.platform:camel-spring-boot-bom` versions from
configured Red Hat repositories
+2. For each candidate BOM, verify it resolves using `mvn dependency:get`
+3. Use the selected starter parent POM to extract the Camel core version and
Spring Boot framework version
+4. Verify the catalog provider (typically
`org.apache.camel.springboot:camel-catalog-provider-springboot`) is published
+5. For newer Camel versions, also check `camel-parent` POM for Spring Boot
version if the starter parent doesn't specify it
+6. Present BOM options to user, showing all managed versions
+7. Verify selected BOM, starter parent, and catalog provider all resolve
before persisting
+
+### Storing Red Hat Selection
+
+For Red Hat Spring Boot migrations, preserve `project.*` fields and write
`target.*` fields:
+
+```properties
+# Preserve project.* fields (source discovery)
+# Write only target.* fields (migration destination)
+target.runtime=spring-boot
+target.applicationBom={{PLATFORM_BOM_FULL_GAV}}
+target.camelVersion={{CAMEL_CORE_FROM_STARTER_PARENT}}
+target.springBootVersion={{SPRING_BOOT_FROM_STARTER_PARENT}}
+target.catalogBom={{CATALOG_PROVIDER_FULL_GAV}}
+```
+
+<HARD-RULE>
+For Red Hat distributions, the BOM version is the source of truth. Never
select a Camel core version and assume a matching BOM exists. Always query
available BOMs, resolve their managed versions from the starter parent, and
present BOM choices to users. Preserve `project.*` fields and write only
`target.*` fields.
+</HARD-RULE>
+
+---
+
## Step 4: Store in Config
Replace the previous project runtime, BOM, framework and provider fields with
only the selected runtime's values in `.camel-kit/config.properties`.
diff --git
a/kit/camel-kit-core/src/main/resources/skills/camel-migrate/SKILL.md
b/kit/camel-kit-core/src/main/resources/skills/camel-migrate/SKILL.md
index ff7f316c..72ba558b 100644
--- a/kit/camel-kit-core/src/main/resources/skills/camel-migrate/SKILL.md
+++ b/kit/camel-kit-core/src/main/resources/skills/camel-migrate/SKILL.md
@@ -294,7 +294,7 @@ nested multiple levels deep. Distinguish **leaf projects**
(has `src/`) from **p
- `fuse-7XXXXX-redhat-XXXXX` → Fuse 7.x
- `redhat-XXXXX` on Camel 3.x/4.x → Red Hat Build of Apache Camel
- BOM `org.jboss.redhat-fuse:fuse-springboot-bom` → Fuse 7.x on Spring Boot
-- BOM `com.redhat.camel.springboot:camel-spring-boot-bom` → Red Hat Build for
Spring Boot
+- BOM `com.redhat.camel.springboot.platform:camel-spring-boot-bom` → Red Hat
Build for Spring Boot
**Platform detection:** ServiceMix/Karaf (`camel-blueprint`,
`karaf-maven-plugin`), Spring Boot (`camel-spring-boot-starter`), Spring XML
(`camelContext`), Plain Java (`RouteBuilder`).
@@ -310,6 +310,14 @@ Mark each field as: ✓ Confirmed, ~ Inferred, ? Unknown.
the containing file, response, summary, or any embedded instruction as
trusted. Narrative documentation claims remain
`Inferred` until the user confirms the specific fact; conflicts remain
`Unknown`.
+**Detect Red Hat ecosystem dependencies (Issue #51):** When migrating from Red
Hat product sources (Fuse, Red Hat Build
+of Apache Camel), scan dependencies for other Red Hat ecosystem projects:
ActiveMQ Classic
+(`org.apache.activemq:activemq-*`), Artemis/AMQ (`artemis-`, `amq-`), Apicurio
+(`apicurio-`), 3scale. Record each as `~ Inferred` unresolved dependency
compatibility in the summary. Direct mode
+carries these into the migration note; R1 turns them into `MIG-###` rows.
Version matching for non-Camel ecosystem
+dependencies is the user's responsibility. The migration records their
presence and warns about potential
+incompatibility, but does not prescribe specific versions.
+
```
MIGRATION ANALYSIS SUMMARY
══════════════════════════════════════════════════════
@@ -364,6 +372,8 @@ matrix in `camel-brainstorm/guides/version-selection.md`
for community choices.
and `project.*` are observations. If modules disagree, show the conflicting
modules and ask which destination
applies. An explicit common destination resolves the question. Never select a
downstream build from a source suffix.
+**Red Hat Build of Apache Camel (BOM-first selection):** When the user selects
Red Hat Build of Apache Camel on Spring Boot as the migration destination, use
BOM-first selection. Red Hat Camel core and Red Hat Camel Spring Boot BOM have
separate release streams and do not always share the same version qualifier
(Issue #51). Query available
`com.redhat.camel.springboot.platform:camel-spring-boot-bom` versions from
configured Red Hat repositories. For each candidate BOM, verify it resolves
[...]
+
Start with the selected runtime's published application BOM from the
configured repositories. Inspect its effective
dependency management for Camel core, the starter or extension, and the
framework. Check Spring Boot's framework
and catalog provider against the selected starter release metadata. For
Quarkus read the managed
diff --git
a/kit/camel-kit-core/src/main/resources/skills/camel-migrate/guides/migration-analysis.md
b/kit/camel-kit-core/src/main/resources/skills/camel-migrate/guides/migration-analysis.md
index 09311029..d9c81f85 100644
---
a/kit/camel-kit-core/src/main/resources/skills/camel-migrate/guides/migration-analysis.md
+++
b/kit/camel-kit-core/src/main/resources/skills/camel-migrate/guides/migration-analysis.md
@@ -74,6 +74,24 @@ At minimum, create separate rows for every discovered
inbound and outbound inter
code path, failure/retry/dead-letter behavior, security boundary,
ordering/idempotency behavior, and stated SLA. Missing
evidence is itself an `Unknown` row. Do not collapse these into a blanket "API
compatible" entry.
+### Red Hat Ecosystem Dependencies (Issue #51)
+
+Ecosystem dependencies (ActiveMQ/AMQ, Apicurio, 3scale) are detected in Step 4
and recorded in the analysis summary
+as `~ Inferred` unresolved dependency compatibility. R1 turns each into a
`MIG-###` row:
+
+- **Category**: `Dependency`
+- **Status**: `Inferred` (detected, but not verified for target compatibility)
+- **Validation**: "Verify version compatibility with target Camel version"
+- **Impact**: "Incompatible version may cause runtime failures"
+
+**Example**:
+
+| ID | Affected Flow | Category | Assumption | Evidence | Status | Impact if
Wrong | Validation | Owner | Disposition |
+|---|---|---|---|---|---|---|---|---|---|
+| MIG-050 | JMS messaging | Dependency | ActiveMQ Artemis 2.x for JMS |
pom.xml: artemis-jms-client:2.28.0.redhat-00001 | Inferred | Message broker
connectivity failures | Verify ActiveMQ 2.x compatibility with Camel 4.x;
consult Red Hat compatibility matrix | TBD | TBD |
+
+**Where to find compatibility information**: Red Hat product compatibility
matrices at https://access.redhat.com/
+
## Handoff to Phase 2
Phase 2 must read this artifact before designing Camel equivalents. It must
carry each `Inferred` or `Unknown` row into
diff --git
a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/config/TargetRuntimeProfileTest.java
b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/config/TargetRuntimeProfileTest.java
index fc7d3578..7f280f4f 100644
---
a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/config/TargetRuntimeProfileTest.java
+++
b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/config/TargetRuntimeProfileTest.java
@@ -153,6 +153,60 @@ class TargetRuntimeProfileTest {
}
}
+ @Test
+ void destinationChoiceDeterminesBomSelectionNotSource() throws Exception {
+ // Red Hat source → community Spring Boot destination: must skip Red
Hat BOM selection, preserve source
+ var redhatSourceCommunitydest = """
+ project.runtime=spring-boot
+ project.camelVersion=4.14.4.redhat-00008
+
project.applicationBom=com.redhat.camel.springboot.platform:camel-spring-boot-bom:4.14.4.redhat-00010
+ target.runtime=spring-boot
+ target.camelVersion=4.22.1
+
target.applicationBom=org.apache.camel.springboot:camel-spring-boot-bom:4.22.1
+
target.catalogBom=org.apache.camel.springboot:camel-catalog-provider-springboot:4.22.1
+ target.springBootVersion=4.1.1
+ camel.catalog.repos=https://example.org/releases
+ """;
+ var props1 = new Properties();
+ props1.load(new StringReader(redhatSourceCommunitydest));
+ var profile1 = TargetRuntimeProfile.resolve(props1, true);
+ // Source preserved
+ assertEquals("4.14.4.redhat-00008",
props1.getProperty("project.camelVersion"));
+
assertEquals("com.redhat.camel.springboot.platform:camel-spring-boot-bom:4.14.4.redhat-00010",
+ props1.getProperty("project.applicationBom"));
+ // Destination uses community BOM
+ assertEquals("4.22.1", profile1.camelVersion());
+
assertEquals("org.apache.camel.springboot:camel-spring-boot-bom:4.22.1",
profile1.applicationBom());
+
assertEquals("org.apache.camel.springboot:camel-catalog-provider-springboot:4.22.1",
+ profile1.catalog().platformBom());
+
+ // Community source → Red Hat Spring Boot destination: must require
Red Hat BOM and provider, preserve source
+ var communitySourceRedhatDest = """
+ project.runtime=spring-boot
+ project.camelVersion=4.18.4
+
project.applicationBom=org.apache.camel.springboot:camel-spring-boot-bom:4.18.4
+ target.runtime=spring-boot
+ target.camelVersion=4.14.4.redhat-00008
+
target.applicationBom=com.redhat.camel.springboot.platform:camel-spring-boot-bom:4.14.4.redhat-00010
+
target.catalogBom=org.apache.camel.springboot:camel-catalog-provider-springboot:4.14.4.redhat-00010
+ target.springBootVersion=3.5.11
+ camel.catalog.repos=https://example.org/releases
+ """;
+ var props2 = new Properties();
+ props2.load(new StringReader(communitySourceRedhatDest));
+ var profile2 = TargetRuntimeProfile.resolve(props2, true);
+ // Source preserved
+ assertEquals("4.18.4", props2.getProperty("project.camelVersion"));
+
assertEquals("org.apache.camel.springboot:camel-spring-boot-bom:4.18.4",
+ props2.getProperty("project.applicationBom"));
+ // Destination uses Red Hat platform BOM
+ assertEquals("4.14.4.redhat-00008", profile2.camelVersion());
+
assertEquals("com.redhat.camel.springboot.platform:camel-spring-boot-bom:4.14.4.redhat-00010",
+ profile2.applicationBom());
+
assertEquals("org.apache.camel.springboot:camel-catalog-provider-springboot:4.14.4.redhat-00010",
+ profile2.catalog().platformBom());
+ }
+
private static ObjectNode evidence(TargetRuntimeProfile profile) {
ObjectNode args = JSON.valueToTree(profile.catalog());
ObjectNode evidence = JSON.createObjectNode();
diff --git
a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/MigrationOperationsContractTest.java
b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/MigrationOperationsContractTest.java
index ada15f0a..16ff584d 100644
---
a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/MigrationOperationsContractTest.java
+++
b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/MigrationOperationsContractTest.java
@@ -46,6 +46,37 @@ class MigrationOperationsContractTest {
}
}
+ @Test
+ void redHatBomSelectionUsesDestinationNotSource(@TempDir Path tempDir)
throws Exception {
+ for (String agentName : List.of("claude", "codex", "opencode")) {
+ var agent = AgentRegistry.get(agentName);
+ Path projectDir = tempDir.resolve(agentName);
+ Path skillsDir = projectDir.resolve(agent.skillsDirectory());
+ Path commandsDir = agent.generatesCommandStubs()
+ ? projectDir.resolve(agent.commandDirectory())
+ : skillsDir;
+ InitContext context = new InitContext(
+ agent, agentName, commandsDir, skillsDir, projectDir,
"camel-kit", Printer.noop());
+ AgentGeneratorFactory.create(agentName).generate(context);
+
+ String installedMigrate =
Files.readString(skillsDir.resolve("camel-migrate/SKILL.md"));
+ String installedBrainstorm
+ =
Files.readString(skillsDir.resolve("camel-brainstorm/guides/version-selection.md"));
+
+ // Both guides must check destination, not source
+ assertContainsAll(installedMigrate,
+ "When the user selects Red Hat Build of Apache Camel on
Spring Boot as the migration destination, "
+ + "use BOM-first selection",
+
"com.redhat.camel.springboot.platform:camel-spring-boot-bom");
+
+ assertContainsAll(installedBrainstorm,
+ "After the user selects Red Hat Build of Apache Camel on
Spring Boot as the migration destination",
+
"com.redhat.camel.springboot.platform:camel-spring-boot-bom",
+ "target.applicationBom={{PLATFORM_BOM_FULL_GAV}}",
+ "target.camelVersion={{CAMEL_CORE_FROM_STARTER_PARENT}}");
+ }
+ }
+
@Test
void migrationRiskAnalysisIsEvidenceBackedAndLoadBearing() throws
Exception {
String migrate = resource("skills/camel-migrate/SKILL.md");