Commit b91400b
committed
Fix Maven 4 CI setup with separate JDK install
The s4u/setup-maven-action@v1.19.0 does not provide reliable outputs
for java-home and maven-home, causing the build-m4 job to fail.
Changes:
- Split combined setup into separate steps:
- Use actions/setup-java@v5 for JDK 17 (id: setup-jdk17)
- Use stCarolas/setup-maven@v5 for Maven 4
- Add dynamic Maven home detection:
- Find mvn in PATH using command -v
- Resolve symlinks with readlink/realpath
- Calculate M4_HOME from mvn binary location
- Maintain JDK 17 as default JAVA_HOME for Maven 4 builds
- Keep JDK 11 available for compatibility (JAVA11_HOME)
This aligns the build-m4 job setup with the proven approach used in
build-legacy, ensuring reliable cross-platform builds.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Introduced in the course of support-and-care/maven-support-and-care#1371 parent 367ffb8 commit b91400b
1 file changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
221 | | - | |
222 | | - | |
| 225 | + | |
223 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
224 | 241 | | |
225 | 242 | | |
226 | 243 | | |
| |||
0 commit comments