ammachado opened a new pull request, #23198:
URL: https://github.com/apache/camel/pull/23198
# Description
Replaces the Node.js/Yarn/Gulp pipeline in `docs/` with a new
`prepare-doc-symlinks` goal in `camel-package-maven-plugin`, and removes the
Node toolchain entirely (`package.json`, `yarn.lock`, `.yarnrc.yml`, `.yarn/`,
`gulpfile.js`).
The new mojo ports the three responsibilities of `docs/gulpfile.js`:
1. Clean + create relative symlinks for `.adoc`, image and `.json` files
from `components/**`, `core/**`, `dsl/**` into the Antora source tree under
`docs/components/modules/...` and
`core/camel-core-engine/src/main/docs/modules/eips/...`.
2. Generate sorted/grouped `nav.adoc` files from `docs/*-nav.adoc.template`,
using each file's `:doctitle:` and optional `:group:`. Sort order matches the
original gulp `compare()` (case-insensitive, summary-before-group), with a
filename tiebreaker for TimSort transitivity.
3. Extract `include::{examplesdir}/...` references from each linked `.adoc`
and symlink the referenced examples under
`components/modules/ROOT/examples/...`.
Wiring changes:
- `docs/pom.xml`: removes the `frontend-maven-plugin` block; adds a
`camel-package-maven-plugin` `prepare-doc-symlinks` execution bound to
`generate-resources` before the existing `xref-check`. The
`${skipOnUnsupported}` property is now read by the mojo as `<skip>`.
- Root `pom.xml`: drops the now-unused `.yarn` / `yarn.lock` / `yarn*.cjs`
Apache RAT excludes.
Cross-platform notes:
- **Windows symlinks**: `Files.createSymbolicLink` requires Developer Mode
or Administrator. The mojo tries a real symlink first and falls back to a plain
file copy on `FileSystemException`, logging once per build (matches the
`vinyl-fs` behaviour gulp had).
- **Glob semantics**: JDK `PathMatcher` has `*`, `**`, `?`, `{a,b}` and
character classes but no extglob `!(...)`. gulp negations are expressed as
`excludes` lists per `KindSpec`, post-filtered by the walker. The
`{,**/}*.json` brace form is used where gulp's `**/*.json` matched across zero
intermediate dirs.
- **Locale-insensitive sort**: `Locale.ROOT` is used for case-folding so a
Turkish-locale builder produces the same nav ordering as en_US.
Verification:
- **Byte-for-byte equivalence**: snapshot the symlink/nav tree on `main` and
on this branch and `diff` them — empty diff means no regression. Snapshot
command is embedded in the test class Javadoc. Locally on macOS the diff is **0
lines**.
- `mvnd test -pl tooling/maven/camel-package-maven-plugin
-Dtest=PrepareDocSymlinksMojoTest`: 12/12 pass. Tests cover `replaceBlock`,
`extractTitle`, and `NavComparator` (incl. transitivity).
- `mvnd -pl docs generate-resources -Dci.env.name=local`: succeeds; no Node
/ Yarn downloaded.
# Target
- [x] I checked that the commit is targeting the correct branch (Camel 4
uses the `main` branch)
# Tracking
- [x] If this is a large change, bug fix, or code improvement, I checked
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-23492)
filed for the change (usually before you start working on it).
# Apache Camel coding standards and style
- [x] I checked that each commit in the pull request has a meaningful
subject line and body.
- [x] I have run `mvn clean install -DskipTests` locally from root folder
and I have committed all auto-generated changes.
---
_Claude Code on behalf of Adriano Machado_
--
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]