Today, the leader asked me to convert Gradle project to POM.xml and record my experience.

Each Gradle project has a build. Gradle file, which is similar to the pom.xml file in Maven.

If your project is an aggregation project, then you should add the following to all of your project’s build.gradle files:

apply plugin: "java"

apply plugin: 'maven'

2. The next step is to compile and download the jar packages you need to download.

Run gradle-install for the main module

4. Rename poM files and place them in their respective root directories

Then close the project. Re-import the project in IDEA, in Maven format. Idea is automatically aware of the maven project, and the project is automatically rebuilt.

The above picture is borrowed, the operation process is correct.