davsclaus opened a new pull request, #31298: URL: https://github.com/apache/camel/pull/31298
_Claude Code on behalf of davsclaus_ [CAMEL-22066](https://issues.apache.org/jira/browse/CAMEL-22066) Removes the support for loading legacy Spring XML `<beans>` files and OSGi `<blueprint>` files in the XML DSL (`camel-xml-io-dsl`). It was deprecated in 4.22 and was only available in Camel CLI and Camel Main with `camel-kamelet-main`. ## Changes - **Model and parser:** removed `BeansDefinition.springOrBlueprintBeans` (and its `@ExternalSchemaElement`), and regenerated `ModelParser` / `ModelWriter`. The parser template keeps the external-namespace mode for `BeansDefinition`, because the `<dataFormats>` wrapper inside `<camel>` needs it. - **Clear error instead of missing beans:** `XmlRoutesBuilderLoader` and `XmlModelParser` fail with a message that explains how to migrate (`<bean>` in `<camel>`, or `camel-spring-xml`). This covers: - a Spring `<beans>` or OSGi `<blueprint>` root - any element in the Spring or Blueprint beans namespace, so a Spring `<bean>` is no longer read as a Camel `<bean>` by its local name - a nested `<camelContext>` Camel's own `<beans>` root and the `camel-spring`/`camel-blueprint` route namespaces keep working. The Camel CLI still picks up these files, so the user sees the error instead of the file being skipped. - **`camel-kamelet-main`:** removed `SpringXmlBeansHandler` and `BlueprintXmlBeansHandler`. `spring-context` is now test scope only: since CAMEL-22119 it was only kept for this support, and the Spring annotations for dependency injection are downloaded on demand (`camel:spring` in `camel-main-known-dependencies.properties`). The CLI no longer ships Spring Framework. - **Docs:** updated the XML DSL page, the Camel CLI beans page and the security policy docs. Added a 4.25 upgrade guide entry with a before/after bean example. It lists three ways to migrate: `camel-spring-xml`, `camel transform route` of Camel CLI 4.22 (LTS), or an AI coding agent with the Camel MCP server. ## Tests - New `XmlLegacyBeansLoadTest` covers the Spring root, the Blueprint root, Spring beans inside `<camel>`, and a nested `<camelContext>`. - Removed the tests of the removed feature: Spring/Blueprint loading, the Spring/Blueprint security policy beans, and the Blueprint transform. - Ran locally: | Module | Tests | |---|---| | `camel-xml-io` | 434 | | `camel-xml-io-dsl` | 76 | | `camel-kamelet-main` | 121 | | `camel-jbang-core` | `TransformTest` | ## Follow-up (not in this PR) `@ExternalSchemaElement` (`tooling/spi-annotations`, copied into `camel-api`) and its support in the parser/writer generators are now unused. Removing them takes a public annotation out of `camel-api`, so it is left for a separate change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
