oscerd opened a new pull request, #3046: URL: https://github.com/apache/camel-kamelets/pull/3046
First half of #1888 — @claudio4j's point that changing a Kamelet currently means running Maven *and* a separate Go toolchain. ## The generator is much smaller than it looks `generator.go` is 105 lines but writes exactly **one** file: `docs/modules/ROOT/nav.adoc`, an `xref` per Kamelet between two generated-file markers. The per-Kamelet pages it once emitted were removed in 6b7d9d520, so most of the file is scaffolding around a small job. `GenerateNavMojo` does the same: read the kamelets directory, sort by file path, take `metadata.name` from each, write the file. ## Wiring Bound to `compile` in `camel-kamelets-bom`, alongside the existing `validate` goal, so an ordinary build regenerates the navigation. Both executions now carry ids, since there is more than one. Jackson does the YAML parsing and is **not** declared in the plugin pom — `ValidateKameletsMojo` already uses Jackson the same way. I did try adding it explicitly, but the version is not managed anywhere in this build, and pinning one here would risk drifting from whatever Camel pulls in. ## Verified byte for byte The check that matters for a rewrite like this: 1. generate `nav.adoc` with the Go tool, keep it 2. delete the file 3. build 4. `cmp` ``` IDENTICAL (9078 bytes, 264 lines) ``` Then a full `mvn clean install` from the root: `nav.adoc` comes out identical again and does not show up in `git status`, so the build is idempotent. `KameletsCatalogTest` passes (18 tests) and the validator still reports no errors. ## CI With the generator gone, `main-push-regen.yaml` has no remaining use for Go, so both the `setup-go` step and the `Run Generator` step are removed. The two `./mvnw clean install` runs it already performs now produce `nav.adoc` themselves, so the regen bot keeps working the same way — it just picks the file up from the build instead of a separate step. I checked `dependabot.yml` for a gomod entry pointing at the deleted directory; there is none, it only watches `/` for maven and github-actions. `README.md` and `AGENTS.md` are updated to match. ## Not in this PR `validator.go` is 506 lines and is the larger half of #1888. It stays in Go here and is untouched, including its `validate.yaml` workflow. Worth landing separately once this one is trusted. --- _Claude Code on behalf of Andrea Cosentino_ -- 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]
