问题描述
我想知道是否有明确的理由选择而不是,用于在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?
推荐答案
有一个有趣的线程这里(提到也是如此)我的理解如下:
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比较老但很好(dixit Fowler比我的重量更重)。
- apiviz是对UMLGraph的重写,但是为什么重写它并不是很清楚。
- 如果没有安装Graphviz,那么apiviz的大优势就是构建不会失败(虽然在我看来这并不能证明整个重写是合理的)。
- apiviz不会自动生成图表,你必须添加标签而不是UMLGraph默认自动生成(可以很方便)全自动的结果很好,所有( UMLGraph也可以模拟自定义javadocs标签的组合关系)。
- UMLGraph似乎做了更多的事情(看起来apiviz只是提供了一般化和界面利用的视图或 UMLGraph显示的类使用实际上有助于理解如何一个班级)但我没有检查自己,这可能不再是真实的或过时的。
- 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.
所以,如果你的项目是公开的,apiviz在没有Graphviz的情况下优雅地工作的事实很好。如果你有很多类,不得不在javadoc中添加标签,这是一个很大的痛苦。如果您正在寻找特殊功能,UMLGraph可能会提供更多功能。实际上,我认为你应该进行实验,因为你显然对最终选择的需求和约束有了更好的了解。
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.
这篇关于UmlGraph vs APIViz for Maven javadoc generation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!