This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/main by this push:
new e87b4d3ec ci: publish only the menu-linked Maven site modules,
flattened (#314)
e87b4d3ec is described below
commit e87b4d3ec920fc4e18302833d2f2cfdf3147c8cc
Author: Lukasz Lenart <[email protected]>
AuthorDate: Wed Jul 1 14:37:47 2026 +0200
ci: publish only the menu-linked Maven site modules, flattened (#314)
The struts reactor stages module sites nested by POM inheritance
(struts2-bom/struts2-parent/struts2-core/...), which does not match the
/maven/... links in the website menu, so those links 404. Instead of moving
the whole staged tree, publish only what the menu references: the top-level
aggregate site at the root, plus struts2-core and struts2-plugins flattened
to /maven/<module>/. Each module site is self-contained and struts2-plugins
carries its submodule sites, so moving whole directories preserves their
links. This also drops the unreferenced modules (jakarta, apps, assembly)
and the bom/parent scaffolding.
Co-authored-by: Claude Opus 4.8 <[email protected]>
---
Jenkinsfile.javadocs | 21 ++++++++++++++++++++-
.../plans/2026-07-01-jenkins-javadocs-pipeline.md | 18 +++++++++++++++++-
.../2026-07-01-jenkins-javadocs-pipeline-design.md | 12 +++++++++++-
3 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile.javadocs b/Jenkinsfile.javadocs
index 1df390474..7f660d148 100644
--- a/Jenkinsfile.javadocs
+++ b/Jenkinsfile.javadocs
@@ -61,9 +61,28 @@ pipeline {
# origin/main, so a bare `git checkout main` is ambiguous across two
remotes.
git checkout -B main asf/main
+ # The struts reactor stages module sites nested by POM inheritance,
e.g.
+ # struts2-bom/struts2-parent/struts2-core/. Publish only what the
website
+ # menu links to: the top-level aggregate site at the root, plus
struts2-core
+ # and struts2-plugins flattened to /maven/<module>/. Each module
site is
+ # self-contained (own css/js/images) and struts2-plugins carries its
own
+ # submodule sites, so moving whole directories keeps their links
intact.
+ STAGING=target/struts/target/staging
+ PARENT="${STAGING}/struts2-bom/struts2-parent"
+
rm -rf source/maven
mkdir -p source/maven
- mv target/struts/target/staging/* source/maven/
+
+ # Top-level aggregate site (index.html, project-info.html, aggregate
apidocs,
+ # dependency reports), skipping the deeply-nested reactor tree.
+ for entry in "${STAGING}"/*; do
+ [ "$(basename "${entry}")" = "struts2-bom" ] && continue
+ cp -r "${entry}" source/maven/
+ done
+
+ # Flatten the two module sites the website menu references.
+ cp -r "${PARENT}/struts2-core" source/maven/struts2-core
+ cp -r "${PARENT}/struts2-plugins" source/maven/struts2-plugins
git add source/maven
git status
diff --git a/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
b/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
index a130d5d9d..a318e004c 100644
--- a/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
+++ b/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
@@ -100,9 +100,25 @@ pipeline {
# origin/main, so a bare `git checkout main` is ambiguous across two
remotes.
git checkout -B main asf/main
+ # The struts reactor stages module sites nested by POM inheritance,
e.g.
+ # struts2-bom/struts2-parent/struts2-core/. Publish only what the
website
+ # menu links to: the top-level aggregate site at the root, plus
struts2-core
+ # and struts2-plugins flattened to /maven/<module>/. Each module
site is
+ # self-contained (own css/js/images) and struts2-plugins carries its
own
+ # submodule sites, so moving whole directories keeps their links
intact.
+ STAGING=target/struts/target/staging
+ PARENT="${STAGING}/struts2-bom/struts2-parent"
+
rm -rf source/maven
mkdir -p source/maven
- mv target/struts/target/staging/* source/maven/
+
+ for entry in "${STAGING}"/*; do
+ [ "$(basename "${entry}")" = "struts2-bom" ] && continue
+ cp -r "${entry}" source/maven/
+ done
+
+ cp -r "${PARENT}/struts2-core" source/maven/struts2-core
+ cp -r "${PARENT}/struts2-plugins" source/maven/struts2-plugins
git add source/maven
git status
diff --git
a/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
b/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
index 92cf21159..f153c3210 100644
--- a/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
+++ b/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
@@ -104,7 +104,17 @@ Mirror the existing `Jenkinsfile` deploy pattern:
- `git checkout -B main asf/main` (explicit remote: a bare `git checkout main`
is
ambiguous because the Pipeline SCM checkout also leaves an `origin/main`)
- `rm -rf source/maven && mkdir -p source/maven`
-- `mv target/struts/target/staging/* source/maven/`
+- Publish selectively (the struts reactor nests module sites by POM
inheritance, e.g.
+ `struts2-bom/struts2-parent/struts2-core/`, which does not match the website
menu):
+ - copy the top-level aggregate site (everything at the staging root
**except** the
+ nested `struts2-bom` tree) → `source/maven/` — gives
`/maven/project-info.html`,
+ `/maven/index.html`, aggregate `/maven/apidocs/`
+ - copy `…/struts2-bom/struts2-parent/struts2-core` →
`source/maven/struts2-core`
+ - copy `…/struts2-bom/struts2-parent/struts2-plugins` →
`source/maven/struts2-plugins`
+ - This flattening makes all four `/maven/…` menu links in
`source/_includes/header.html`
+ resolve with no menu change. Safe because each module site is
self-contained
+ (own css/js/images) and `struts2-plugins` carries its submodule sites.
Trade-off:
+ secondary "up"/breadcrumb links inside the Maven pages may not resolve.
- `git add source/maven`
- `git diff --cached --quiet || git commit -m "Updates Maven site by Jenkins"`
- `git push asf main`