{"id":13735783,"url":"https://github.com/iluwatar/uml-reverse-mapper","last_synced_at":"2025-05-08T12:31:08.072Z","repository":{"id":41390232,"uuid":"41878159","full_name":"iluwatar/uml-reverse-mapper","owner":"iluwatar","description":"Automatically generate class diagram from code. Supports Graphviz, PlantUML and Mermaid output formats.","archived":false,"fork":true,"pushed_at":"2024-04-29T18:13:59.000Z","size":2220,"stargazers_count":219,"open_issues_count":12,"forks_count":85,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-05-01T21:18:17.483Z","etag":null,"topics":["class-diagram","graphviz","hacktoberfest","maven-plugin","mermaid","plantuml","uml","uml-diagram","uml-diagrams"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"NitorCreations/DomainReverseMapper","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iluwatar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":null}},"created_at":"2015-09-03T18:59:53.000Z","updated_at":"2024-04-29T20:37:24.000Z","dependencies_parsed_at":"2023-10-15T11:17:49.749Z","dependency_job_id":null,"html_url":"https://github.com/iluwatar/uml-reverse-mapper","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iluwatar%2Fuml-reverse-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iluwatar%2Fuml-reverse-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iluwatar%2Fuml-reverse-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iluwatar%2Fuml-reverse-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iluwatar","download_url":"https://codeload.github.com/iluwatar/uml-reverse-mapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732131,"owners_count":17360416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class-diagram","graphviz","hacktoberfest","maven-plugin","mermaid","plantuml","uml","uml-diagram","uml-diagrams"],"created_at":"2024-08-03T03:01:11.134Z","updated_at":"2024-11-15T04:30:40.659Z","avatar_url":"https://github.com/iluwatar.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"![Build Status](https://github.com/iluwatar/uml-reverse-mapper/actions/workflows/maven-ci.yml/badge.svg)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.iluwatar.urm/urm-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.iluwatar.urm/urm-maven-plugin/)\n[![Join the chat at https://gitter.im/iluwatar/uml-reverse-mapper](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iluwatar/uml-reverse-mapper?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n# UML Reverse Mapper\n\nAutomatically generate class diagram from your code.\n\nUsing reflection, UML Reverse Mapper scans your packages that contain your code. It builds the class relations and can output as a [Graphviz](https://www.graphviz.org/) .dot file, a [PlantUML](http://www.plantuml.com/) .puml file or a [Mermaid](https://mermaid-js.github.io/mermaid/#/)  .mmd file.\n\nThe tool is available in command line version (urm-core) and Maven plugin (urm-maven-plugin).\n\n### Using from the command-line\n\nBuild the `urm-core` project with `./mvnw clean package` and grab the generated artifact `urm-core.jar`. Then you need the archive that will be analyzed. In this example we use `abstract-factory.jar` and assume the package name to be `com.iluwatar.abstractfactory`. Place the jar-files in the same directory and execute the following command.\n\n    java -cp abstract-factory.jar:urm-core.jar com.iluwatar.urm.DomainMapperCli -p com.iluwatar.abstractfactory -i com.iluwatar.abstractfactory.Castle\n\nThis will scan all the classes under the package `com.iluwatar.abstractfactory` except `Castle` that was marked to be ignored and output the markup to your console output. By default PlantUML presenter is used, but it can be changed with switch `-s graphviz` or `-s mermaid`. If you want to write it to file use switch `-f filename`. If you need to scan multiple packages use format `-p \"com.package1, com.package2\"`. Note that under Windows OS the classpath separator is `;` instead of `:`\n\n### Using the Maven plugin\n\nAdd to your pom.xml the following:\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    \u003cplugin\u003e\n      \u003cgroupId\u003ecom.iluwatar.urm\u003c/groupId\u003e\n      \u003cartifactId\u003eurm-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e2.1.1\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003c!-- if outputDirectory is not set explicitly it will default to your build dir --\u003e\n        \u003coutputDirectory\u003e${project.basedir}/etc\u003c/outputDirectory\u003e\n        \u003cpackages\u003e\n          \u003cparam\u003ecom.mycompany.mypackage\u003c/param\u003e\n          \u003cparam\u003ecom.mycompany.other_package\u003c/param\u003e\n        \u003c/packages\u003e\n        \u003cignores\u003e\n          \u003cparam\u003ecom.mycompany.mypackage.MyClass\u003c/param\u003e\n          \u003cparam\u003ecom.mycompany.other_package.OtherClass\u003c/param\u003e\n        \u003c/ignores\u003e\n        \u003cincludeMainDirectory\u003etrue\u003c/includeMainDirectory\u003e\n        \u003cincludeTestDirectory\u003efalse\u003c/includeTestDirectory\u003e\n        \u003cpresenter\u003egraphviz\u003c/presenter\u003e\n      \u003c/configuration\u003e\n      \u003cexecutions\u003e\n        \u003cexecution\u003e\n          \u003cphase\u003eprocess-classes\u003c/phase\u003e\n          \u003cgoals\u003e\n            \u003cgoal\u003emap\u003c/goal\u003e\n          \u003c/goals\u003e\n        \u003c/execution\u003e\n      \u003c/executions\u003e\n      \u003cdependencies\u003e\n        \u003cdependency\u003e\n          \u003cgroupId\u003ecom.example\u003c/groupId\u003e\n          \u003cartifactId\u003eexample\u003c/artifactId\u003e\n          \u003cversion\u003e1.0.0\u003c/version\u003e\n        \u003c/dependency\u003e\n      \u003c/dependencies\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n- `packages` configuration parameter contains a list of packages that should be included in the class\ndiagram \n- `ignores` configuration parameter contains a list of types that should be excluded from the class\ndiagram\n- `dependencies` list should contain the artifacts where the classes are found. See https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_dependencies_Tag\n- `includeMainDirectory` configuration parameter indicates to include classes of src/main/java \ndirectory. Default value of `includeMainDirectory` is true. \n- `includeTestDirectory` configuration parameter indicates to include classes of src/test/java \ndirectory. Default value of `includeTestDirectory` configuration parameter is false.\n- `presenter` parameter control which presenter is used. Can be `graphviz`, `plantuml` or `mermaid`.\n\nWhen `process-classes` life-cycle phase gets executed, the class diagram will be saved to the location specified by `outputDirectory` parameter. If not specified the file is saved\nto `/target/${project.name}.urm.\u003cext\u003e`, where \u003cext\u003e is one of `dot` (graphiv), `puml` (plantuml), or `mmd` (mermaid). Use this file with your local\nor online tools to show your class diagram.\n\n### Showcases\n\nHere are some class diagrams generated with the `urm-maven-plugin`.\n\n![Graphviz example](examples/graphviz-example.png \"Graphviz example\")\n![PlantUML example](examples/plantuml-example.png \"PlantUML example\")\n![Mermaid example](examples/mermaid-example.png \"Mermaid example\")\n\n### Deploy Instructions\n\n[Performing a Release Deployment](http://central.sonatype.org/pages/apache-maven.html#performing-a-release-deployment)\n\n```\nexport GPG_TTY=$(tty)\n./mvnw clean deploy -P release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filuwatar%2Fuml-reverse-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filuwatar%2Fuml-reverse-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filuwatar%2Fuml-reverse-mapper/lists"}