Gradle build.gradle 到 Maven pom.xml [英] Gradle build.gradle to 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
这篇关于Gradle build.gradle 到 Maven pom.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!