我不知道任何Ruby,但我喜欢asciidoctor (和gradle插件)。有没有一种简单的方法可以让插件生成plantuml图?
我研究了基本的asciidoctor-diagrams功能,它似乎特定于使用原生/ruby asciidoctor扩展(我没有,也不想安装,因为我喜欢使用gradle插件)。
做得很好的Ruby页面显示,它接受asciidoctor-gradle-plugin模块的requires选项,但没有任何基于Ruby的选项,我不确定这是否是我所需要的。
我尝试了阻力最小的路径,即:
asciidoctor {
logDocuments = true
separateOutputDirs = false
sourceDir = file("src")
outputDir = file("$buildDir/html")
backends = [ 'html5' ]
requires "asciidoctor-diagram"
}根据我的基本工厂测试:
.The PlantUML block extension class
[plantuml, sample-plantuml-diagram, alt="Class diagram", width=135, height=118]
----
class BlockProcessor
class PlantUmlBlock
BlockProcessor <|-- PlantUmlBlock
----但得到的是:
* What went wrong:
Execution failed for task ':asciidoctor'.
> (LoadError) no such file to load -- asciidoctor-diagram在配置阶段。
如何配置asciidoctor-gradle-plugin来处理plantuml?
发布于 2015-03-10 01:22:20
mrhaki to the rescue.我不想完全抄袭他的帖子,但是如果那个链接坏了,在gradle文件中还有许多其他的依赖项需要满足。第一个我没有的是com.github.jruby-gradle:jruby-gradle-plugin:0.1.5,然后他应用了包括com.github.jruby-gradle.base在内的两个插件,并且依赖于ruby gem (rubygems:asciidoctor-diagram:1.2.0)。我认为他的博客网站是非常可靠的,所以我不会深入细节。
发布于 2016-08-02 20:40:00
我也有同样的问题,消息来源是我漏掉了这行字。
gemPath = jrubyPrepare.outputDir,它似乎将存储gem的路径传递给asciidoctor任务。
或者至少这让no such file to load问题消失了,然后我得到了一个关于找不到graphviz的错误,我可以通过在我的机器上安装graphviz来解决这个问题。
https://stackoverflow.com/questions/28889458
复制相似问题