Javadoc Inserting UML Diagrams

后端 未结 7 1602
南笙
南笙 2021-01-30 23:20

Is there a way to embed images into my JavaDoc? Basically i want to include some UML diagrams explaining the hierarchy of my classes in some of the documentation.

Thank

7条回答
  •  醉话见心
    2021-01-30 23:26

    This article shows how to use UMLGraph with Maven Javadoc plugin.

    In short:

    1. Install GraphViz.

      Ubuntu: apt-get install graphviz4.
      Windows: download.

    2. Update pom.xml.

          
              maven-javadoc-plugin
              2.7
              
                  true
                  private
                  org.umlgraph.doclet.UmlGraphDoc
                  
                      org.umlgraph
                      doclet
                      5.1
                  
                  
                      -inferrel -attributes -types -visibility -inferdep -quiet -hide java.* -collpackages java.util.* -qualify -postfixpackage
                      -nodefontsize 9
                      -nodefontpackagesize 7
                  
              
          
      
    3. Run mvn javadoc:javadoc.

提交回复
热议问题