到maven 项目根目录执行如下命令即可:gradle init --type pom
本人环境 Gradle 4.6 亲自测试可行
smqk@lenovo:~/git/cn/xuexiyuan/blog$ gradle -v
------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------
Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Linux 4.4.0-138-generic amd64
smqk@lenovo:~/git/cn/xuexiyuan/blog$ gradle init --type pom
> Task :init
Maven to Gradle conversion is an incubating feature.
BUILD SUCCESSFUL in 2s
2 actionable tasks: 1 executed, 1 up-to-date
smqk@lenovo:~/git/cn/xuexiyuan/blog$