UmlGraph 与 APIViz 用于 Maven javadoc 生成

发布于 2024-08-11 11:44:03 字数 238 浏览 4 评论 0原文

我想知道是否有任何明确的理由选择 UmlGraph 而不是 APIViz 用于在 Maven2 构建中生成 javadoc UML 图。两者之间是否有任何集成或功能,它们看起来非常相似?

I'm wondering if there are any clear reasons to choose UmlGraph over APIViz for javadoc UML diagram generation in a Maven2 build. Are there any integration or features that one has over the other, they seem pretty similar?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

婴鹅 2024-08-18 11:44:03

这里有一个关于 UMLGraph 与 apiviz 的有趣主题(提到了 在这个问题上也是如此),我的理解如下:

  • UMLGraph 较旧,但非常好(dixit Fowler 的权重更大)比我)。
  • apiviz 是 UMLGraph 的重写,但目前还不清楚为什么要重写它。
  • apiviz 的“大”优势是,如果未安装 Graphviz,构建不会失败(但在我看来,这并不能证明整个重写是合理的)。
  • apiviz 不会自动生成图形,您必须添加标签,而 UMLGraph 默认情况下会自动生成(这可能很方便)并且完全自动的结果对所有人来说都很好且容易UMLGraph 可以还可以使用自定义 javadocs 标签对组合关系进行建模)。
  • UMLGraph 似乎可以做更多的事情(“看起来 apiviz 只不过提供了泛化和接口利用率的视图”或“UMLGraph 显示的类用法实际上有助于理解类如何有效”),但我没有检查自己,这可能不再正确或已经过时。

因此,如果您的项目是公开的,那么 apiviz 无需 Graphviz 即可正常工作,这一点很好。如果你有很多类,那么必须在 javadoc 中到处添加标签是一个很大的痛苦。如果您正在寻找特殊功能,UMLGraph 可能会提供更多。实际上,我认为您应该尝试两者,因为您显然对最终选择的需求和限制有更好的了解。

There is an interesting thread here about UMLGraph vs apiviz (which are mentioned in this question on SO too) and my understanding is the following:

  • UMLGraph is older but is really nice (dixit Fowler which has more weight than me).
  • apiviz is a rewrite of UMLGraph but it's not really clear why the rewrote it.
  • The "big" advantage of apiviz is that the build won't fail if Graphviz isn't installed (this doesn't justify a whole rewrite though in my opinion).
  • apiviz doesn't generate graphs automatically, you have to add tags versus UMLGraph do it automatically by default (which can be convenient) and the totally automatic results is fine and easy for all (UMLGraph can also model composition relation with custom javadocs tags).
  • UMLGraph seems to do more things ("it looks like apiviz does nothing more than provide a view of generalizations and interface utilization" or "the class usage shown by UMLGraph actually helps to understand how a class works") but I didn't check myself and this might be not true anymore or outdated.

So, if you project is public, the fact that apiviz gracefully works without Graphviz is nice. If you have lots of classes, having to add tags in javadoc everywhere is a big pain. If you're looking for special features, UMLGraph might offer more. Actually, I think you should experiment both as you obviously have a better knowledge of your needs and constraints for the final choice.

貪欢 2024-08-18 11:44:03

apiviz 需要注释来生成图形,这是不正确的,因为它的文档明确指出:

APIviz 默认情况下会自动发现包和类之间的关系及其构造型。此外,您可以使用以下 doclet 标签来添加更多关系或使生成的图表看起来更清晰。

It is not true that apiviz requires annotations for the generation of graphs, as its documentation clearly states:

APIviz automatically discovers the relationship between packages and classes and their stereotype by default. Additionally, you can use the following doclet tags to add more relationships or to make the generated diagram look cleaner.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文