Copyright © 2009 Red Hat Middleware
Table of Contents
JBoss Tattletale is a tool that can help development teams getting an overview of the project they are working on or a product they depend on.
The tool generates reports that will show dependencies and general information that can help identify areas that needs attention such as minimizing the number of dependencies or eliminate duplicated class files from the class path.
JBoss Tattletale will help to improve the quality of your software project.
Jesper Pedersen acts as the lead for the JBoss Tattletale project. He can be reached at jesper (dot) pedersen (at) jboss (dot) org.
Have you ever found yourself frustrated with a ClassNotFoundException? Would you like to know what libraries are in your project and what they depend on? Would you like to get a full report on this stuff every time you run your ant build? If so you need to use the JBoss Tattletale project!
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.
The 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
Identify sealed and signed JAR archives
Locate a class in a JAR file
Get the OSGi status of your project
JBoss Tattletale will recursive scan the directory pass as the argument for JAR files and then build the reports as HTML files.
JBoss Tattletale is licensed under GNU Lesser General Public License (LGPL) version 2.1 or later.
We hope that JBoss Tattletale will help you in your development tasks !
Please, visit the official JBoss Tattletale project page at http://www.jboss.org/tattletale/.
You must have one of the following JDKs installed in order to build the project:
Sun JDK 1.5.x
Sun JDK 1.6.x
Remember to ensure that "javac" and "java" are in your path (or symlinked).
JAVA_HOME=/location/to/javahome export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH
You must have Apache Ant 1.8.1+ installed on your system.
Remember to ensure that "ant" are in your path (or symlinked).
ANT_HOME=/location/to/anthome export ANT_HOME PATH=$ANT_HOME/bin:$PATH export PATH
JBoss Tattletale uses Apache Ivy for dependency management. The build environment automatically bootstrap the installation of Apache Ivy.
The anonymous SVN repository is located under:
svn co http://anonsvn.jboss.org/repos/tattletale/ tattletale-trunk
The developer SVN repository is located under:
svn co https://svn.jboss.org/repos/tattletale/trunk/ tattletale-trunk
In order to build the JBoss Tattletale project you execute:
ant <target>
where target is one of
dist
Builds the distribution.
release
Builds the release archives.
doc
Builds the documentation for the project.
clean
Cleans the project of temporary files.
See the full list of targets in the main build.xml file.
JBoss Tattletale uses 3 spaces for indentation with curly brakets on the next line as the class or the statement.
/** * My class */ public class MyClass { /** * My method */ public void myMethod() { if (value) { // Do something } else { // Do something else } } }
Remember to add JavaDoc for all classes and methods.
You can verify the formatting rules by running checkstyle on the source code:
ant checkstyle
See the source code for more examples of the source code formatting rules.
Adding a new report to JBoss Tattletale is very easy, so if you have found a report that you would like to see that shouldn't stop you from adding it.
You need a class that extends from:
org.jboss.tattletale.reporting.Report
and implements its abstract methods. The JavaDoc for JBoss Tattletale will show you the class hierarchy as you may want to extend from another class.
After you have implemented the new report you add it to the correct category inside
org.jboss.tattletale.Main
That is it. See the existing reports in JBoss Tattletale for examples on how to do this.
JBoss Tattletale include functionality to identify certain classloader structures.
The plugins must implement the
org.jboss.tattletale.reporting.classloader.ClassLoaderStructure
interface and contain a default no-argument constructor.
The interface only contain one method that needs to be implemented:
/** * Can one archive see the other * @param from The from archive * @param to The to archive * @return True if from can see to; otherwise false */ public boolean isVisible(Archive from, Archive to);
which returns true if the "from" archive can see the "to" archive. Otherwise false should be returned.
The current plugins can be used as a starting point for developing a new plugin:
org.jboss.tattletale.reporting.classloader.NoopClassLoaderStructure
A no operation plugin that always will include the queried archive in the report.
org.jboss.tattletale.reporting.classloader.JBossAS4ClassLoaderStructure
Plugin for the JBoss Application Server 4.x series.
org.jboss.tattletale.reporting.classloader.JBossAS5ClassLoaderStructure
Plugin for the JBoss Application Server 5.x series.
The plugin is loaded through the 'classloader' key in jboss-tattletale.properties file. See the user guide for more information.