如何将Maven构建转换为Gradle? [英] How to convert a Maven build to Gradle?

查看:849
本文介绍了如何将Maven构建转换为Gradle?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我应该使用我的build.gradle和init.gradle文件,但我不知道该写什么或如何使用pom.xml文件指向我的项目文件夹。

$ b $第一步是在包含(master)POM的目录中运行 gradle init 。这会将Maven构建转换为Gradle构建,生成一个 settings.gradle 文件和一个或多个 build.gradle 文件。对于更简单的Maven构建,这就是你需要做的。对于更复杂的Maven构建,可能需要在Gradle方面手动添加无法自动转换的功能。


I know I should be working with my build.gradle and init.gradle files but I don't know what to write or how to point to my project folder with the pom.xml file.

解决方案

The first step is to run gradle init in the directory containing the (master) POM. This will convert the Maven build to a Gradle build, generating a settings.gradle file and one or more build.gradle files. For simpler Maven builds, this is all you need to do. For more complex Maven builds, it may be necessary to manually add functionality on the Gradle side that couldn't be converted automatically.

这篇关于如何将Maven构建转换为Gradle?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆