An open source tool to create Javadocs through Maven2 with automatic UML diagrams like ydoc

I want to create javadocs through the maven site generation plugin, and I want automatic UML diagrams to be created and embedded in javadoc.

The statsvn project uses yDoc to create its UML documentation, but I think they use Maven1. yDoc is a commercial shareware product, so I'm not sure if the open source statsvn project integrates with it (or if there is a free version for javadoc generation).

Svnstat yDoc javadoc example: ChurnPageMaker.java

svnstat includes ydoc as a plugin to generate a Maven1 report: project.xml

    <reports>
            <report>maven-ydoc-plugin</report>
 ...
    </reports>

yDoc documentation says that you can use the javadoc doclet Maven2 user approach (but I can't figure out where to download yDoc or if it's free). The statsvn project seems to be using yDoc, so I guess it's free?

Are there any other open source Javadoc doclet generators that integrate with Maven2 to generate javadocs with built-in class diagrams.

+3
source share
3 answers

It looks like the APIViz doclet supports the Maven2 javadoc plugin for creating class diagrams in javadoc.

  <reporting>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <doclet>org.jboss.apiviz.APIviz</doclet>
          <docletArtifact>
            <groupId>org.jboss.apiviz</groupId>
            <artifactId>apiviz</artifactId>
            <version>1.3.0.GA</version>
          </docletArtifact>
          <useStandardDocletOptions>true</useStandardDocletOptions>
          <charset>UTF-8</charset>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <breakiterator>true</breakiterator>
          <version>true</version>
          <author>true</author>
          <keywords>true</keywords>
          <additionalparam>
            -sourceclasspath ${project.build.outputDirectory}
          </additionalparam>
        </configuration>
      </plugin>
      ...
    </plugins>
    ...
  </reporting>
+2
source

Maven 2 http://maven.apache.org/plugins/maven-javadoc-plugin/examples/alternate-doclet.html, , UmlGraph javadoc ( Graphviz PATH). POM UmlGraph doclet:

<project>
  ...
  <reporting> (or <build>)
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.6.1</version>
        <configuration>
          <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
          <!-- <docletPath>/path/to/UmlGraph.jar</docletPath> -->
          <docletArtifact>
            <groupId>org.umlgraph</groupId>
            <artifactId>doclet</artifactId>
            <version>5.1</version>
          </docletArtifact>
          <additionalparam>-views</additionalparam>
          <useStandardDocletOptions>true</useStandardDocletOptions>
        </configuration>
      </plugin>
    ...
    </plugins>
  </reporting> (or </build>)
  ...
</project>
+1

, java, Doxygen? , , . question Javadocs Doxygen.

0

Source: https://habr.com/ru/post/1722522/


All Articles