Gradle build.gradle 到 Maven pom.xml

Gradle build.gradle 到 Maven pom.xml

问题描述:

我有一个 Gradle 项目,我需要传输它的所有依赖项并与另一个 Maven 项目一起使用.换句话说,我如何从 build.gradle 生成(或者我可以生成)pom.xml?

I have a Gradle project and I need all its dependencies to be transferred and used with another Maven project. In other words how can I generate (or can I generate) the pom.xml from the build.gradle?

最内置的解决方案可能是使用 Maven 插件中的 archiveTask 任务,它会在 poms 文件夹在你的构建目录中.http://www.gradle.org/docs/current/userguide/maven_plugin.html#秒:maven_pom_generation

The most built in solution would likely be to use the archiveTask task in the Maven Plugin which will generate a pom in the poms folder in your build dir. http://www.gradle.org/docs/current/userguide/maven_plugin.html#sec:maven_pom_generation