-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Welcome to the visualee wiki.
How to include visualee in your mavenproject
Visualee is a maven plugin to visualize the cdi- and jpa-dependencies of a java ee project. It addresses questions like:
- How could i get an overview of a java ee project?
- Who fires events and who is observing it?
- How could i visualize JPA-Relations?
- Who is producing classes and where are they injected?
- Which resources are injected?
- ...
There is an example graph of the opensource project lightfish available.
visualee is available on maven central. Add this to your pom:
<plugin>
<groupId>de.struller-baumann</groupId>
<artifactId>visualee</artifactId>
<version>0.26</version>
<configuration>
<outputdirectory>visualee</outputdirectory>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>visualize</goal>
</goals>
</execution>
</executions>
</plugin>
After including visualee in your pom, simply build your project. The visualization will be generated in a project outputdirectory called "visualee". In the log should be something like:
[visualee:visualize]
#######################################################
### VisualEE-Plugin
### Analyzing sourcefolder: /[your project path]
### Generating graphs
### Done, visualization can be found in
### /[your project path]/visualee/index.html
#######################################################
Open the generated index.html in your browser and select one of the generated graphs. In the index.html is a quick help (click to open it) about using the GUI.
It is recommended to use the google chrome browser, due to it's javascript performance and HTML5-capabilities. It's only tested with chrome version >= 28.0.1500.71 and firefox version >= 22.
Ensure that the browser could open local files (e.g. for chrome „google-chrome %U –allow-file-access-from-files“). Or serve the visualee-folder via http (e.g. python -m SimpleHTTPServer).
It's possible to configure the graphs individually. The attributes are:
- distance
- gravity
- graphwidth
- graphheight
- fontsize (in percent)
The graph-name is the name of the generated files.
- default => the default-configuration for all graphs
- graphOnlyCDIJPA
- graphAllClasses
- graphEventObserverClasses
- graphEJBClasses
- graphInstanceClasses
- graphInjectClasses
- graphProducesClasses
- graphInstanceProducesClasses
- graphConnectedInjectProducesClasses
- graphConnectedInjectInstanceProducesClasses
- graphConnectedInstanceProducesClasses
- graphResourcesClasses
- graphJPAClasses
Example plugin-definition/configuration:
<plugin>
<groupId>de.struller-baumann</groupId>
<artifactId>visualee</artifactId>
<version>0.26</version>
<configuration>
<outputdirectory>visualee</outputdirectory>
<graphs>
<graph>
<name>default</name>
<distance>180</distance>
<gravity>20</gravity>
<graphwidth>800</graphwidth>
<graphheight>500</graphheight>
<fontsize>90</fontsize>
</graph>
<graph>
<name>graphInjectClasses</name>
<distance>200</distance>
<gravity>20</gravity>
<graphwidth>1200</graphwidth>
<fontsize>110</fontsize>
</graph>
<graph>
<name>graphEJBClasses</name>
<distance>300</distance>
<gravity>30</gravity>
</graph>
</graphs>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>visualize</goal>
</goals>
</execution>
</executions>
</plugin>
Don't hesitate to contact me: mailto:[email protected]