Croway opened a new pull request, #27959: URL: https://github.com/apache/camel/pull/27959
Section B of [CAMEL-25642](https://issues.apache.org/jira/browse/CAMEL-25642): the migration and dependency tools of camel-jbang-mcp answered with wrong data. Sections A (runtime tools) and C (OpenAPI scaffold) are separate PRs. ### Changes - **`camel_migration_recipes`**: the Spring Boot command activates `org.apache.camel.upgrade.CamelSpringBootMigrationRecipe` (verified in apache/camel-upgrade-recipes tag 4.22.0, `META-INF/rewrite/latest.yaml`; the old `CamelMigrationRecipe` name fails with "recipe not found"); the recipes artifact version is the target's `<major>.<minor>.0` with a note (the recipes are released per minor and migrate to that version; Maven Central has 4.8.0 to 4.22.0 without 4.19.0); the OpenRewrite plugin is no longer pinned (`mvn -U ... rewrite-maven-plugin:run|dryRun`, as the recipes README); the Quarkus command uses the real `quarkus-maven-plugin` parameters (`-DrewriteDryRun=true` / `-Drewrite=true`, verified in Quarkus 3.40.1 `UpdateMojo`; the old `-DrewriteFullRun` does not exist) and takes an optional `quarkusPlatformVersion` (the catalog releases have no Quarkus version, and the tool does not go to the network; without it the command updates to the latest platform with a note to pass the version from `camel_version_list`). The Java suggestion comes from the target release's JDK data. - **`camel_migration_compatibility`**: the Java requirement comes from `catalog.camelReleases()` (new package-private `CamelReleases` helper: exact release, else newest of the same minor, else latest) instead of the hardcoded "4.19+ requires Java 21"; an unknown version is a warning, not a blocker; the never-used `camelComponents` argument is removed; `javaCompatibility` lists `supportedVersions`. - **`camel_dependency_check` / `camel_dependency_security_audit` / `camel_migration_analyze`**: Spring Boot starters and Camel Quarkus extensions count as the component they provide (new `DependencyLookup.runtimeArtifact` / `camelArtifactId` in camel-jbang-core, also used by `camelArtifact`); `PomAnalysis` separates declared from managed dependencies, so a component only in `dependencyManagement` or in a plugin no longer counts; the Quarkus BOM snippet is `io.quarkus.platform:quarkus-camel-bom` at the project's Quarkus version (or `camel-quarkus-bom` with a placeholder and a note), never the Camel version; the version status compares with the latest release (`latestVersion` next to `catalogVersion`) instead of a SNAPSHOT catalog version. The security audit says in `warnings` when the POM sets no Camel version and then audits the `camelVersion` argument or lists every advisory of the declared components; advisories without a component list that may apply are returned as `uncheckedA dvisories` and `clean` is false when any exist; `reachable` is null when no routes are passed. - **Runtime detection** (`MigrationData`): `war` packaging or `maven-war-plugin` means WildFly only without Spring Boot or Quarkus (a Spring Boot WAR was sent to the WildFly migration tool); plugin markers are read from `<plugin>` elements and `spring-boot-starter-parent` from `<parent>`; `bundle` packaging counts as Karaf. - **`camel_properties_translate`**: `camel.springboot.lenient-configuration-binding` keeps its key on Spring Boot (the only `camel.springboot.*` option left in camel-spring-boot 4.23, per the 4.5 upgrade guide "only the special Spring Boot options"); `main-run-controller` becomes `camel.main.run-controller`; the Spring Boot-only options (`include-non-singletons`, `warn-on-early-shutdown`, `type-conversion`, `run-controller`) are reported as "Spring Boot only, no equivalent" for Main or Quarkus; `camel.server.*` and `camel.management.*` are described as camel-main, not jbang-only. - **Docs**: tool rows in `camel-jbang-mcp.adoc`; upgrade guide 4.24 section "migration and dependency tools" (removed argument, changed answers). ### Tests - `MigrationToolsTest` (+5, Spring Boot WAR fixture: runtime detection from plugins, Java requirement from release data, recipe commands), `DependencyCheckToolsTest` (+2, inline Spring Boot and Quarkus POMs, Quarkus BOM snippet), `DependencySecurityAuditToolsTest` (+2: parent-managed version with and without `camelVersion`; at 4.2.0 CVE-2024-22371 is unchecked so the audit is not clean), `PropertiesTranslateToolsTest` (+1). AssertJ, as the module. - After the rebase: `mvnd -P apache-snapshots test -pl dsl/camel-jbang/camel-jbang-core,dsl/camel-jbang/camel-jbang-mcp -Dtest='DependencyLookupTest,MigrationToolsTest,DependencyCheckToolsTest,DependencySecurityAuditToolsTest,PropertiesTranslateToolsTest,MigrationDataSearchTest'`: all pass. Before the rebase the whole camel-jbang-mcp module passed (464 tests). Not in this PR: `camel_route_harden_context` has the same blind spot for advisories without components; dropping or merging tools is for CAMEL-25639. _Claude Code on behalf of Croway_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
