To detect version conflicts, known incompatible dependency pairs, and duplicate JARs
in Spring Boot microservice projects (Maven or Gradle), and produce an actionable
conflict report with resolution suggestions.
Use this skill when the user:
NoSuchMethodError, ClassNotFoundException, LinkageError
Ask the user for (or infer from context):
pom.xml or build.gradle)
maven | gradle | auto)
html (default, visual) | txt | json (for CI)
all (default) | warn | error
For multi-module projects, always point to the parent/root directory so all sub-modules are scanned.
Run the bundled detection script:
python scripts/detect_conflicts.py \
--project-dir <用户项目路径> \
--output conflict-report.html \
--mode auto \
--level all
Script capabilities:
mvn dependency:tree (Maven) or gradle dependencies (Gradle) to get the full resolved dependency tree
pom.xml parsing if Maven/Gradle CLI is unavailable
groupId:artifactId, different versions across modules
Output files:
conflict-report.html — visual HTML report (default, recommended)
conflict-report.txt — plain text for terminal review
conflict-report.json — machine-readable for CI integration
After scanning, present results clearly:
references/conflict_patterns.md 提供具体 POM/Gradle 修改示例
For resolution guidance, load references/conflict_patterns.md which contains:
If the user wants specific fixes, generate the corresponding dependencyManagement
XML snippet or Gradle resolutionStrategy block inline in the reply.
preview_url or open_result_view
jq 过滤 ERROR 级别
mvn/gradle is not available on PATH, the script falls back to static POM parsing
(less accurate — transitive dependencies won't be resolved). Inform the user.
javax. → jakarta. conflicts.
pom.xml.
0 = no ERROR conflicts; 1 = at least one ERROR found (useful for CI gates).
共 1 个版本