Gradle to Maven Project Migration
Paste the following prompt into your AI chat to install this skill:
Please install @user_50dee564/gradle2maven by following the guide at https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Converting a multi-module Gradle Java project to Maven often loses build.gradle, settings.gradle, version variables, module coordinates, and annotation-processor wiring. Editing the original tree in place also makes rollback harder.
How It Works
The skill copies the source tree to ${projectName}_mvn or a user-named directory and generates the root and module pom.xml files only in that copy. It parses Gradle DSL, maps dependency scopes, resolves project(':module') local dependencies, nested modules, annotationProcessor entries, and unresolvable version placeholders, then runs mvn validate. Gradle files are cleaned only after validation passes, and a migration report is produced.
Boundaries
It suits standard Java multi-module Gradle-to-Maven conversion, with emphasis on compile, provided, runtime, and test mapping. Gradle-specific code-generation chains such as Palantir baseline, Conjure, or Protobuf are skipped and flagged for manual handling; cleanup does not run if mvn validate fails.
Use Cases
- Adopt a multi-module Gradle repo and generate a Maven copy that passes mvn validate without touching the original tree.
- Map api, implementation, compileOnly, and runtimeOnly dependencies in build.gradle to Maven scopes with centralized versions.
- Handle settings.gradle :parent:child nesting and generate matching root, parent, and child pom.xml files with relativePath.
- Emit maven-compiler-plugin annotationProcessorPaths for Java modules and verify dependency resolution with mvn validate.
Best For
- Backend engineers maintaining multi-module Java services who need a Gradle build converted into a Maven copy that passes mvn validate.
- Application engineers taking over legacy Gradle projects who need root and module pom.xml files while keeping the original tree for rollback.
- Platform engineers migrating build pipelines who need to audit scope mapping, centralized version management, and annotationProcessor wiring.
- Engineers using Palantir Conjure or baseline plugins who need Gradle-only plugins skipped and manual Maven-side items documented.
Related Skills
A QQ bot messaging framework based on qq-botpy, covering guild, C2C, and group message flows, scheduled pushes, and troubleshooting.
Explains how to calculate N+1 severance, including service-year rounding, monthly wage base, caps, taxes, and notice pay.
Takes a name input and returns a simple hello greeting.
A BPU quantization tool for Horizon RDK S100 that handles PyTorch/ONNX calibration, stride alignment, post-processing, and board-side validation.