首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对于Java Maven项目,是不是有/ Docco / etc?

对于Java Maven项目,是不是有/ Docco / etc?
EN

Stack Overflow用户
提问于 2013-05-17 17:25:49
回答 3查看 529关注 0票数 3

可以在使用Maven的Java (多模块)项目上运行Marginalia吗?

或者,有没有其他类似于Marginalia或Docco的替代方案可以做到这一点?

对我来说,重要的是能够将其作为依赖项从某个公共Maven存储库添加并直接使用,而无需安装任何额外的东西,例如Node.js for Docco --这是合理的,因为它是一个Java项目。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-05-17 18:53:12

我尝试了几种方法:

Zi plugin;

  • Jocco
  • Marginalia (尽管它没有在任何Maven上发布);
  • ,然后,我找到了Maven

我将不得不修改我的评论格式以适应guide,但我认为这个Maven插件可以完成这项工作。有什么想法吗?

票数 2
EN

Stack Overflow用户

发布于 2014-12-25 02:15:40

如果人们还在寻找替代javadoc的编程文档生成器。我已经尝试过Atlassian Docco,但是生成的文档并不那么吸引人和可读性。然后发现了Groc到目前为止,比以前要好得多。Groc的目标是支持Literate Programming。试试看。Groc似乎不包含Maven依赖项

票数 0
EN

Stack Overflow用户

发布于 2017-11-26 07:22:32

docufier是一个将带有文档注释(例如单元测试)的类转换为markdown的工具。还有一个maven插件。

下面的测试案例就是一个例子:

代码语言:javascript
复制
/**
 *
 * Output and Input
 * ----------------
 *
 * For more control over the execution we'll use a `ProcBuilder` instance to configure
 * the process.
 *
 * The run method builds and spawns the actual process and blocks until the process exits.
 * The process takes care of writing the output to a stream, as opposed to the standard
 * facilities in the JDK that expect the client to actively consume the
 * output from an input stream:
 */
@Test
public void testOutputToStream() {
    ByteArrayOutputStream output = new ByteArrayOutputStream();

    new ProcBuilder("echo")
        .withArg("Hello World!")
        .withOutputStream(output)
        .run();

    assertEquals("Hello World!\n", output.toString());
}

它将呈现为下面的markdown:

代码语言:javascript
复制
Output and Input
----------------

For more control over the execution we'll use a `ProcBuilder` instance to configure
the process.

The run method builds and spawns the actual process and blocks until the process exits.
The process takes care of writing the output to a stream, as opposed to the standard
facilities in the JDK that expect the client to actively consume the
output from an input stream:

~~~ .java
ByteArrayOutputStream output = new ByteArrayOutputStream();

new ProcBuilder("echo")
    .withArg("Hello World!")
    .withOutputStream(output)
    .run();

assertEquals("Hello World!\n", output.toString());
~~~

有关完整的示例,请参阅从acceptance test suite生成的jproc项目的README.md

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16605669

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档