Generate UML diagrams through introspection: Domain classes, Controller/Service classes, Database schemas.
Documentation:
- ✅ Global Class diagrams for Domain (see screenshot section above)
- ✅ Global Class diagrams (layered) for Controllers & Services & other beans (see screenshot section above)
- ✅ Global Class diagrams from DB2 database dump
- ✅ Diagrams exposed as specific UmlController (http interface) (see screenshot section above)
- ✅ Diagram generation via plantUML.jar from PlantUML project
- ✅ Configuration of the output (html wizard or directly through http GET parameters)
- ✅ Image output types: SVG,
PNG - 🕘 Diagrams exposed as a grails script: "grails to-uml" (cli interface)
- 🕘 Inclusion in standard gdoc process
- 🕘 Output compatible with diagram manipulation software
- ⛔ (Out of the scope of this plugin, see instead swagger)
Document specifically webapp interfaces (public methods of Controllers, with javadoc, input/output spec?) - ⛔ (No longer considered useful)
Diagram generation using online PlantUML server - ⛔ (No longer considered useful)
Diagram generation using online yUML - ✅ Works with Grails 2.x, see version 0.4.4 or 64aa962
- 🕘 Works with Grails 3.x, see version 0.7 which applied http://docs.grails.org/3.2.x/guide/upgrading.html
See the User Guide
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.
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
).
- http://grails.org/plugin/class-domain-uml
- http://www.grails.org/plugin/create-domain-uml
- https://github.com/trygvea/grails-class-diagram/
- https://github.com/david-w-millar/grails-plantuml-plugin
- https://code.google.com/p/grails-domain-uml/source/browse/#svn%2FCreateDomainUml
- http://sdedit.sourceforge.net/
- https://www.websequencediagrams.com/