wiki:PlantUmlMacro

News

2015-06-15: Version 2.0 has been released, supporting Trac 0.11 and later.

Render PlantUML diagrams in wiki pages

Description

This plugin allows the integration of PlantUML on Trac wiki pages, where the diagrams are dynamically generated and embedded. See below for examples.

PlantUML is a Java utility that allows generation of different types of UML diagrams (such as sequence, activity, state, use cases, objects) from a simple text description file.

Bugs/Feature Requests

Existing bugs and feature requests for PlantUmlMacro.

If you have any issues, create a new ticket.

defect

12 / 12

enhancement

8 / 8

task

4 / 4

Download

Download the zipped source from here.

Source

You can check out PlantUmlMacro from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Notes:

  1. Below instructions should be specific to some operating systems. Please help expanding these instructions.
  2. [sudo] is optional in case you already have authorisation to modify your server.

Installation steps:

  1. Check dependencies:
    1. A valid Java runtime environment.
    2. plantuml.jar: save it to the location that you'll specify in the configuration section /path/to/plantuml.jar:
    3. Graphviz: check if installed and working as required in graphvizdot.
      [sudo] java -jar plantuml.jar -testdot
      

  2. Install component:
    • with easy_install, globally:
      [sudo] easy_install https://trac-hacks.org/svn/plantumlmacro/trunk
      

  3. Enable this component as follows:
    • by updating trac.ini file under appropriate configuration section;
      [components]
      plantuml.* = enabled
      
    • or accessing your Admin panel (under selected Trac environment ..admin/general/plugins ).
  4. Configure the Trac environment as follows:
    • by updating trac.ini file under appropriate configuration section;
      [plantuml]
      plantuml_jar = /path/to/plantuml.jar
      java_bin = /path/to/java_bin (optional, if Java binary is not on the search path)
      
      • example: plantuml_jar = /project-resources/trac/plugins.
      • example: java_bin = java, assumes that the Java binary is on the search path.
    • or accessing your Admin panel under selected Trac environment ..admin/general/plugins.
  5. Restart web server:
    • Apache on Ubuntu, example command line:
      [sudo] /etc/init.d/apache2 restart
      

  6. Test if this component is working properly (main environment and secondary ones if you have). If this component is installed correctly, then the example shown in the #Usage section should be also displayed on the WikiMacros#PlantUML-macro page.

Usage

  1. As a WikiProcessor with markup:
    {{{#!PlantUml
    @startuml
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response
    Alice -> Bob: Another authentication Request
    Alice <-- Bob: another authentication Response
    @enduml
    }}}
    
    will render the following UML diagram:

  1. As a WikiProcess rendering files from the repository:
    {{{#!plantuml path="/path/to/repository"
    ...
    }}}
    
    {{{#!plantuml path="/repos/path/to/repository@rev"
    ...
    }}}
    
  1. As a macro rendering files from the repository:
    [[PlantUml(/path/to/repository)]]
    [[PlantUml(/path/to/repository@rev)]]
    

Additional documentation can be found on the WikiMacros page after installing the macro. More information on the PlantUML language and different types of UML diagrams can be found on the PlantUML Website.

Recent Changes

14688 by rjollos on 2015-06-18 02:50:57
2.1dev: Removed tag_svn_revision attribute.

The attribute is not supported in setuptools >= 10.

14668 by rjollos on 2015-06-16 02:26:47
2.0: Tag PlantUmlMacro 2.0. Refs #9958.
14667 by rjollos on 2015-06-16 02:23:55
2.0: Bump version to 2.0.
(more)

Author/Contributors

Author: airadier
Maintainers: Álvaro Iradier, rjollos
Contributors: ebencheung, Erwin Rademaker

Last modified 7 months ago Last modified on Feb 17, 2016, 9:14:35 PM

Attachments (1)

Download all attachments as: .zip