maven-build-lifecycle
Use when reproducing and repairing Maven CI build failures, especially legacy multi-module builds and Maven Invoker integration tests.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- maven-build-lifecycle
- description
- Use when reproducing and repairing Maven CI build failures, especially legacy multi-module builds and Maven Invoker integration tests.
03 SKILL.md 正文
Steps
-
Locate the real checkout workspace under
/home/travis/build/failed/**(do not stop at a namespace/owner folder; you must reach the final build workspace that containspom.xmland usually a.gitdirectory/file).- Start with discovery (single tool calls; a short
cd ... && ls -lais OK):cd /home/travis/build/failed && ls -la - Drill down with
ls -launtil you reach the directory that actually contains the build files. - If you’re unsure where the checkout root is, find it directly:
Thenfind /home/travis/build/failed -maxdepth 5 -type d -name .git -printcdto the parent directory of the.githit and confirm:pwd
(You should seels -lapom.xml,.travis.yml,mvnw, or module directories.)
- Start with discovery (single tool calls; a short
-
Read CI configuration before interpreting errors to learn the real Maven command and JDK:
sed -n '1,220p' .travis.yml -
Record toolchain versions (paste these into
failed_reasons.txt):java -versionjavac -versionmvn -version -
Match the CI JDK before patching project files. If CI pins an older JDK and the environment provides the BugSwarm/Travis switcher:
source /opt/jdk_switcher/jdk_switcher.shjdk_switcher use <ci-jdk>export TRAVIS_JDK_VERSION=<ci-jdk>java -versionDo not “modernize away” failures that only occur because you ran the project on a newer JDK than CI.
-
Reproduce the failure using the CI command (same flags/profiles, including any
-f <reactor-pom>). If you need clearer “missing artifact/plugin” coordinates, also try:mvn -o -B -e verify --fail-at-end -
Write/update the required diagnosis + plan file early (don’t defer; keep updating as you learn more):
printf '%s\n' \ "Repo: $(pwd)" \ "Repro command: <paste exact mvn command from CI>" \ "Observed failure: <paste key Maven error lines>" \ "Root cause guess: <code vs build config?>" \ "Plan: <files to change + why>" \ > /home/travis/build/failed/failed_reasons.txtVerify it exists and is non-empty:
test -s /home/travis/build/failed/failed_reasons.txt && echo "notes ok" -
Maven Invoker / nested test projects: fix dependency resolution in the template sources, not
target/**.- If the failure is in a nested build (Invoker often runs under
target/it/**ortarget/**), map the failing nested directory back to its source template (commonlysrc/it/**, sometimessrc/test/resources/**) and edit that template’spom.xml/invoker.properties, not generated copies undertarget/**. - Choose the correct modification scope by checking the nested project’s
<parent>chain:- If the nested project does not inherit from your reactor/parent POM, fixes must be made inside the nested template (or a parent POM within that template), because it won’t see your reactor
dependencyManagement/pluginManagement. - If it does inherit from a repository parent POM, fix the parent so the nested project picks up the change naturally.
- If the nested project does not inherit from your reactor/parent POM, fixes must be made inside the nested template (or a parent POM within that template), because it won’t see your reactor
- Distinguish plugin resolution failures vs normal dependency failures; nested builds may need their own plugin versions/repositories when they don’t inherit yours.
- If the failure is in a nested build (Invoker often runs under
-
Create the required patch diff file(s), then apply them to the repo.
- Generate a unified diff from local edits (run in the repo root so the patch lands at
/home/travis/build/failed/<repo>/<id>/patch_1.diff):git diff > patch_1.difftest -s patch_1.diff && echo "patch ok" - Prove/apply the patch artifact (separates “patch creation” from “patch application”):
git checkout -- .git apply patch_1.diff - Verify the working tree reflects the patch:
git statusgit diff --stat
- Generate a unified diff from local edits (run in the repo root so the patch lands at
-
Re-run the exact CI verification command until it succeeds, remembering
mvn verifymay run integration/Invoker steps thatmvn testdoes not.
Expected Result
- You are working inside the concrete checkout directory (contains
pom.xmland typically.git). /home/travis/build/failed/failed_reasons.txtexists and is non-empty.patch_1.diffexists in the repo root and is non-empty.- The Maven CI command (including nested/Invoker builds when present) passes under the CI-declared JDK.
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms