lukaszlenart opened a new pull request, #310:
URL: https://github.com/apache/struts-site/pull/310
Follow-up fix to #309. The first run of the new `Struts-site-javadocs`
pipeline failed:
```
+ mvn -B -V clean install -DskipTests
mvn: not found
ERROR: script returned exit code 127
```
## Root cause
`MAVEN_3_LATEST_HOME` is **not set** on the `git-websites`/`websites2`
agent, so `PATH = "${MAVEN_3_LATEST_HOME}:${env.PATH}"` prepended an empty
entry and `mvn` was never on PATH. The apache/struts Jenkinsfile — on the same
ASF Jenkins — provisions tooling with a declarative `tools` block, not env vars.
## Fix
Replace the PATH hack with:
```groovy
tools {
jdk 'jdk_17_latest'
maven 'maven_3_latest'
}
```
This puts `mvn` on PATH via the Jenkins tool installer on whatever node
runs, and also supplies **JDK 17** (Struts 7 requires it — a latent failure the
first run never even reached). The `git-websites` agent and plain `mvn` usage
are unchanged.
Spec and plan updated to match.
🤖 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]