Auto-generation of UML Class Diagrams in Maven Projects

The yWorks UML Doclet is a handy Javadoc extension that automatically creates good-looking UML diagrams from Java classes and embeds them into the generated API documentation.

Although the tool is not free sofware, it’s Community Edition is available for free of charge under the following conditions:

The Community Edition of the Software is licensed to you free of charge. It comes without support and warranties of any kind. The Community Edition of the Software inserts a web link into your output files that points to the yWorks website. You may not change that link or prevent either display of the link or the intended use as means of navigation to get to the yWorks website in any way.

These terms are quite reasonable and you don’t have to pay a high price for such a great tool.

The functionality offered by the product is also available in Apache Maven projects via the Maven Javadoc Plugin. The following is a minimal POM that demonstrates how to use the doclet in Maven projects:

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">

Can’t wait to try it? Download and unpack the archive of the Community Edition, then run Maven with mvn site -DyDoc.path=PATH where PATH is the path of the directory that contains your yDoc installation. Alternatively, the path can also be given in the properties element of the POM:


The screenshot below shows the appearance of the enhanced API documentation.

API documentation with auto-generated UML class diagram

Thanks to László Aszalós for recommending this excellent tool.

Tagged ,

2 thoughts on “Auto-generation of UML Class Diagrams in Maven Projects

  1. Sridhar says:


    This is Sridhar Goranti. I tried the same thing in my project.
    1. I downloaded and extracted in to c:\ drive and
    2. updated my pom.xml file with the below entry-



    3. Executed below command from my command prompt:-
    mvn site -DyDoc.path=c:\yEd-3.10
    4. I ran my Mavn install from my application – it went successful

    But where can we see the UML diagrams, Is there any additional settings that we need to do, please help me here.

    Thanks & Regards,
    Sridhar Goranti

    • Sridhar says:


      I found the solution for the UML Diagrams where you can generate from the java source code, I used the and downloaded the plugin.

      1. I am able to generate the class diagrams and
      2. But when I try generate the sequence diagram from my java code, I am getting issue with Licence.

      No Licence was found for ‘com.objectaid.uml.seq’

      Please help me, If any one worked on similar that uses open source plugins / tools for the same.

      Thanks & Regards,
      Sridhar Goranti

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: