davsclaus opened a new pull request, #25884:
URL: https://github.com/apache/camel/pull/25884

   ## Summary
   
   - `DiagramDevConsole` moved out of `org.apache.camel.jbang.console` into 
`components/camel-diagram` (CAMEL-23400), but the generated dev-console 
metadata for the old class in `camel-jbang-console` was never cleaned up — 
`GenerateDevConsoleMojo` only adds/updates files for currently-annotated 
classes, it never removes orphaned output for classes that no longer exist.
   - Removes the two stale leftovers: 
`src/generated/resources/META-INF/org/apache/camel/dev-console/route-diagram.json`
 and the SPI factory marker 
`src/generated/resources/META-INF/services/org/apache/camel/dev-console/route-diagram`,
 both still pointing at the deleted 
`org.apache.camel.jbang.console.DiagramDevConsole` class.
   - This is not purely cosmetic: `DefaultDevConsolesLoader.loadDevConsoles()` 
scans every resource under `META-INF/services/org/apache/camel/dev-console/*` 
on the classpath and calls `DevConsoleResolver.resolveDevConsole(id)` for each. 
`DefaultDevConsoleResolver` only swallows `NoFactoryAvailableException` — any 
other exception while resolving the (now missing) class is rethrown as 
`IllegalArgumentException`, which propagates out of the scan loop and aborts it 
early, silently preventing the two real consoles in this module (`jbang`, 
`source-dir`) from loading whenever they'd be scanned after `route-diagram`.
   
   Found while investigating CAMEL-24514 (#25883) — a background sweep to 
regenerate dev-console catalog metadata across every module flagged this file 
as stale and untouched by any rebuild.
   
   ## Test plan
   
   - [x] `cd dsl/camel-jbang/camel-jbang-console && mvn verify` — clean build, 
`dev-consoles.properties` correctly lists only `jbang source-dir`, no 
`route-diagram` regenerated.
   - [x] `mvn -Psourcecheck` clean (formatting/import-order/license).
   - [x] Confirmed no other module still contains a `route-diagram` marker 
pointing at the old class.
   
   _Claude Sonnet 5 on behalf of @davsclaus_


-- 
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]

Reply via email to