Skip to content
Thomas-S-B edited this page Jan 24, 2014 · 95 revisions

Welcome to the visualee wiki.

What is visualee?

What is visualee?

How to include visualee in your mavenproject

How to use visualee

FAQ

Questions, comments, ideas?

What is visualee?

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.

How to include visualee in your mavenproject

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>

How to use visualee

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.

FAQ

There are no classes displayed

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).

How to configure the graphs

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>

Questions, comments, ideas?

Don't hesitate to contact me: mailto:[email protected]