Skip to content

igorrosenberg/grails-plugin-uml-class-diagram

 
 

Repository files navigation

grails-plugin-uml-class-diagram

Generate UML diagrams through introspection: Domain classes, Controller/Service classes, Database schemas.

Documentation:

Screenshots

Wizard example

Domain example

Layers example

Features

  1. ✅ Global Class diagrams for Domain (see screenshot section above)
  2. ✅ Global Class diagrams (layered) for Controllers & Services & other beans (see screenshot section above)
  3. ✅ Global Class diagrams from DB2 database dump
  4. ✅ Diagrams exposed as specific UmlController (http interface) (see screenshot section above)
  5. ✅ Diagram generation via plantUML.jar from PlantUML project
  6. ✅ Configuration of the output (html wizard or directly through http GET parameters)
  7. ✅ Image output types: SVG, PNG
  8. 🕘 Diagrams exposed as a grails script: "grails to-uml" (cli interface)
  9. 🕘 Inclusion in standard gdoc process
  10. 🕘 Output compatible with diagram manipulation software
  11. ⛔ (Out of the scope of this plugin, see instead swagger) Document specifically webapp interfaces (public methods of Controllers, with javadoc, input/output spec?)
  12. ⛔ (No longer considered useful) Diagram generation using online PlantUML server
  13. ⛔ (No longer considered useful) Diagram generation using online yUML
  14. ✅ Works with Grails 2.x, see version 0.4.4 or 64aa962
  15. 🕘 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

About

Generate UML diagrams from your Grails app source code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 86.7%
  • Shell 8.8%
  • Batchfile 4.5%