JavaBlog.fr / Java.lu DEVELOPMENT,Java,Tools Tools: JBoss Tattletale

Tools: JBoss Tattletale

JBoss Tattletale is a tool that can help you get an overview of the project you are working on or a product that you depend on. It scans the Java Archives (.JAR) files, traverses Java class file directories and generates design quality metrics for each Java package. More, it is a valuable analysis tool of JARs related to JAVA projects. JBoss Tattletale generates a report HTML whose the main HTML file is “index.html”.

This tool will provide you with reports that can help you:

  • Identify dependencies between JAR files
  • Find missing classes from the classpath
  • Spot if a class/package is located in multiple JAR files
  • Spot if the same JAR file is located in multiple locations
  • With a list of what each JAR file requires and provides
  • Verify the SerialVersionUID of a class
  • Find similar JAR files that have different version numbers
  • Find JAR files without a version number
  • Find unused JAR files

Quick start:
JBoss Tattletale will recursively scan the directory passed as the argument for JAR files and then build the reports as HTML files.
Running JBoss Tattletale is very easy:

java -Xmx512m -jar tattletale.jar [-exclude=<excludes>] <sourcedir> [<outputdir>]

where:

  • the “sourcedir” is the directory that contains your Java archives
  • the optional “outputdir” parameter is the directory where you would like your reports to be generated. Analysis reports generate in current directory if no output-directory set. The main file will be generated as index.html.
  • the “-exclude” option let you exclude directories or file on the command line – see the configuration file for syntax.

Examples:

java -Xmx512m -jar C:\MyFiles\Development\Java\tools\tattletale-1.1.2.Final\tattletale.jar   C:\MyFiles\Development\Java\dev\JarRepository    C:\MyFiles\Development\Java\tools\tattletale-1.1.2.Final\huoTattletaleReportsGeneratedJarRepository

If you open the “index.html” file of “huoTattletaleReportsGeneratedJarRepository” directory, you will obtain the following screen with the Dependencies, Reports and Archives sections:

For example, you could see also the circular dependencies between the JARs files like the following screen:

Comments/Remarks:
JBoss Tattletale requires Java Runtime Environment 5 or higher. It is licensed under GNU Lesser General Public License (LGPL) version 2.1 or later.
JBoss Tattletale could be used:

  • With ANT:
    JBoss Tattletale integrates with Apache Ant such that you can generate the reports directly from your build environment (add tattletale.jar, tattletale-ant.jar and javassist.jar to the Apache Ant classpath).
  • With MAVEN:
    JBoss Tattletale integrates with Apache Maven such that you can generate the reports directly from your build environment (add tattletale.jar, tattletale-maven.jar and javassist.jar to the Apache Ant classpath). To be able to use the Tattletale Maven plugin in a Maven project, it is necessary to add the plugin declaration in the pom.xml of the project.

Source/Download: http://www.jboss.org/tattletale

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post