可以在使用Maven的Java (多模块)项目上运行Marginalia吗?
或者,有没有其他类似于Marginalia或Docco的替代方案可以做到这一点?
对我来说,重要的是能够将其作为依赖项从某个公共Maven存储库添加并直接使用,而无需安装任何额外的东西,例如Node.js for Docco --这是合理的,因为它是一个Java项目。
发布于 2013-05-17 18:53:12
发布于 2014-12-25 02:15:40
如果人们还在寻找替代javadoc的编程文档生成器。我已经尝试过Atlassian Docco,但是生成的文档并不那么吸引人和可读性。然后发现了Groc到目前为止,比以前要好得多。Groc的目标是支持Literate Programming。试试看。Groc似乎不包含Maven依赖项
发布于 2017-11-26 07:22:32
docufier是一个将带有文档注释(例如单元测试)的类转换为markdown的工具。还有一个maven插件。
下面的测试案例就是一个例子:
/**
*
* 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:
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。
https://stackoverflow.com/questions/16605669
复制相似问题