grails-plugin-uml-class-diagram
Generate UML diagrams through introspection: Domain classes, Controller/Service classes, Database schemas.
Documentation:
Screenshots
![Wizard example](https://github.com/igorrosenberg/grails-plugin-uml-class-diagram/raw/master/src/docs/images/0.4.3-wizard.png)
![Domain example](https://github.com/igorrosenberg/grails-plugin-uml-class-diagram/raw/master/src/docs/images/0.4.3-domain.png)
![Layers example](https://github.com/igorrosenberg/grails-plugin-uml-class-diagram/raw/master/src/docs/images/0.4.3-layers.png)
Features
- :white_check_mark: Global Class diagrams for Domain (see screenshot section above)
- :white_check_mark: Global Class diagrams (layered) for Controllers & Services & other beans (see screenshot section above)
- :white_check_mark: Global Class diagrams from DB2 database dump
- :white_check_mark: Diagrams exposed as specific UmlController (http interface) (see screenshot section above)
- :white_check_mark: Diagram generation via plantUML.jar from PlantUML project
- :white_check_mark: Configuration of the output (html wizard or directly through http GET parameters)
- :white_check_mark: Image output types: SVG,
PNG
- :clock9: Diagrams exposed as a grails script: "grails to-uml" (cli interface)
- :clock9: Inclusion in standard gdoc process
- :clock9: Output compatible with diagram manipulation software
- :no_entry: (Out of the scope of this plugin, see instead swagger)
Document specifically webapp interfaces (public methods of Controllers, with javadoc, input/output spec?)
- :no_entry: (No longer considered useful)
Diagram generation using online PlantUML server
- :no_entry: (No longer considered useful)
Diagram generation using online yUML
- :white_check_mark: Works with Grails 2.x, see version 0.4.4 or 64aa962
- :clock9: Works with Grails 3.x, see version 0.7 which applied http://docs.grails.org/3.2.x/guide/upgrading.html
Usage
See the User Guide
Installation
Add runtime ":uml-class-diagram:0.4.0"
to BuildConfig.groovy in the plugins section (requires grails 2.0 > *).
The plugin depends on GraphViz. You may install it through your favorite package manager
or via http://www.graphviz.org/Download.php.
Development
The steps described below are available in a dedicated test app
- Create a web-app:
grails create-app web
- Add in BuildConfig of this new projet (adjust path as needed):
grails.project.fork = [
test: false ,
run: false ,
war: false ,
console: false ,
]
grails.reload.enabled = true
grails.plugin.location.'uml-class-diagram'="../grails-plugin-uml-class-diagram"
Apart from the last line, we're basically turning off grails 2.3 forking process, which hampers auto-reload.
You may also need to add grails.reload.enabled = true to ../grails-plugin-uml-class-diagram/.../BuildConfig.groovy
From then on, you can modify code in the plugin, and your "web" application reflects the changes immediately (extra step: maybe you need to run it with grails -reloading run-app
).
Inspiration from