我可以在 Gradle 中使用 Maven 插件(发音)吗? [英] Can I use a Maven plugin (enunciate) in Gradle?

查看:30
本文介绍了我可以在 Gradle 中使用 Maven 插件(发音)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为 enunciate 的 Maven 插件,可以生成很好的 API 文档.我更愿意使用 Gradle 作为我的构建工具,但它似乎在这方面受到限制,或者我只是不知道如何使用它.

I have a maven plugin called enunciate that generates nice API documentation. I'd rather use Gradle as my build tool but it looks like it's limited in this aspect or maybe I just don't know how to use it.

我想知道是否可以以某种方式在 gradle 中使用 Maven 插件(发音)?我是否必须编写一个蚂蚁脚本并调用它?到目前为止,我还找不到用于 enunciate 的 gradle 示例,所以我猜它不受支持?

I'm wondering if it's possible to use a maven plugin (enunciate) in gradle somehow? Do I have to write an ant script and call that? So far I can't find a gradle example for enunciate so I'm guessing it's not supported?

推荐答案

您不能在 Gradle 中按原样使用 Maven 插件;您必须将其移植到 Gradle 插件.这有多难取决于插件使用了多少 Maven API.另一种策略可能是通过 Gradle 的 Exec 任务调用 Maven.

You can't use a Maven plugin as-is in Gradle; you'll have to port it to a Gradle plugin. How difficult this is depends on how many Maven APIs the plugin is using. Another strategy might be to call into Maven via Gradle's Exec task.

这篇关于我可以在 Gradle 中使用 Maven 插件(发音)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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