Method 3: Convert existing Maven project to Gradle project
1 Execute commands at the Maven project's root directory
$gradle init –type pom
This command generates the following Gradle files based on the pom files. Respectively,
▪ gradle folder: contains gradleWrapper information
▪ gradlew and gradlew. bat: run on Linux/Mac and Windows, respectively, to execute Gradle wrapper commands.
▪ build.gradle: the primary Gradle configuration file, which contains dependencies and runtime configurations.
▪ settings.gradle: used to support multi-project.
2 The Maven configuration is automatically converted to Gradle configuration after the command executes successfully, but the runtime environment configuration is not automatically generated. It is recommended you use the org.gretty plug-in to support gretty and tomcat runtime environments. Running the project can be done with commands such as $gradlew appRun or $gradlew tomcatRun.