maven-dependency-management
Diagnose and fix Maven dependency/classpath problems (missing classes, removed JDK APIs, unwanted transitive deps) in a multi-module build.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- maven-dependency-management
- description
- Diagnose and fix Maven dependency/classpath problems (missing classes, removed JDK APIs, unwanted transitive deps) in a multi-module build.
03 SKILL.md 正文
Steps
- When compilation fails due to a missing type (e.g.,
javax.annotation.Generated), locate all occurrences first:grep -R --line-number "javax.annotation.Generated" .- Record the primary failing file/line in
failed_reasons.txt.
- Decide the smallest, most-compatible remediation:
- Prefer switching to a JDK-provided equivalent when appropriate (e.g., use
javax.annotation.processing.Generatedinstead ofjavax.annotation.Generatedto avoid relying on Java EE modules removed from newer JDKs). - If a replacement is not viable, add an explicit dependency in the relevant module POM (e.g.,
javax.annotation:javax.annotation-api) and confirm scope (usuallycompilefor referenced production code).
- Prefer switching to a JDK-provided equivalent when appropriate (e.g., use
- Verify the dependency/classpath impact with Maven tooling:
mvn -pl :<module> -am -DskipTests compilemvn -pl :<module> dependency:tree -Dincludes=<groupId>:<artifactId>when conflicts are suspected.
- For JDK-specific artifacts like
tools.jar(e.g., transitivecom.sun:toolsfrom older test utilities), prefer:- relying on upstream profiles guarded by file existence when available, and/or
- excluding problematic transitive dependencies at the exact consuming dependency site (so it’s localized and doesn’t change unrelated modules).
- After each dependency change, re-run the minimal build command that hits the failing phase (compile vs test) to confirm the error is gone.
Expected Result
Compilation and test classpaths are correct on the current JDK, with missing-types errors resolved via either (a) a compatible type replacement or (b) an explicit, correct-scope dependency, without destabilizing other modules.
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