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, LinkageErrorAsk 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 | errorFor multi-module projects, always point to the parent/root directory so all sub-modules are scanned.
Run the bundled detection script:
bash
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 treepom.xml parsing if Maven/Gradle CLI is unavailablegroupId:artifactId, different versions across modulesOutput files:
conflict-report.html — visual HTML report (default, recommended)conflict-report.txt — plain text for terminal reviewconflict-report.json — machine-readable for CI integrationAfter 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_viewjq 过滤 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).