Chapter 3. Getting started

3.1. Installation

JBoss Tattletale can be downloaded in its binary form for easy installation.

The download location is: http://www.jboss.org/tattletale/downloads

Once downloaded extract the files by executing:

unzip jboss-tattletale-1.1.1.GA.zip
     

or

tar xzf jboss-tattletale-1.1.1.GA.tar.gz
     

depending on which archive type you downloaded.

JBoss Tattletale is now located in a folder under the directory you extracted the files into.

3.1.1. Maven

The JBoss Tattletale project is published in the JBoss Maven2 repository:

repository.jboss.org
       

under the group id of: org.jboss.tattletale

The artifacts for the project are

  • tattletale: The core library
  • tattletale-ant: The Apache Ant tasks
  • tattletale-maven: The Apache Maven plugin

Developer snapshots are published on the JBoss Snapshots Maven2 server:

snapshots.jboss.org
       

3.1.2. Source code

If you want to experiment with the latest developments you may checkout the latest code from SVN. Be aware that the information provided in this manual might then not be accurate.

The anonymous SVN repository is located under:

svn co http://anonsvn.jboss.org/repos/tattletale/trunk/ tattletale-trunk
       

The developer SVN repository is located under:

svn co https://svn.jboss.org/repos/tattletale/trunk/ tattletale-trunk
       

The project is compiled using Java Development Kit 1.5 or higher, Apache Ant 1.7 or higher and Apache Ivy 2.1 or higher. Using

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.

3.2. Configuration

The configuration of JBoss Tattletale is done through its

jboss-tattletale.properties
     

file.

The current configuration parameters includes:

Table 3.1. JBoss Tattletale configuration

KeyValue
reports A comma separated list of which reports that should be generated. The following reports are supported:
  • classdependants

    The "Class Dependants" report.

  • classdependson

    The "ClassDependsOn" report.

  • dependants

    The "Dependants" report.

  • dependson

    The "DependsOn" report.

  • graphviz

    The "Graphical dependencies" report.

  • transitivedependants

    The "Transitive Dependants" report.

  • transitivedependson

    The "Transitive DependsOn" report.

  • circulardependency

    The "Circular Dependency" report.

  • classlocation

    The "Class Location" report.

  • osgi

    The "OSGi" report.

  • sealed

    The "Sealed Information" report.

  • sign

    The "Signing Information" report.

  • eliminatejars

    The "Eliminate Jar files with different versions" report.

  • invalidversion

    The "Invalid version" report.

  • multiplejars

    The "Multiple Jar files" report.

  • multiplejarspackage

    The "Multiple Jar files (Package)" report.

  • multiplelocations

    The "Multiple Locations" report.

  • unusedjar

    The "Unused Jar" report.

  • blacklisted

    The "Black listed" report.

  • noversion

    The "No version" report.

  • jar

    The "Jar archive" report.

Default: All reports (reports=*)

classloader Specifies which classloader structure that should be used when scanning the archives. Can be one of the following:
  • org.jboss.tattletale.reporting.classloader.NoopClassLoaderStructure

    A no-operation classloader structure implementation that doesn't scope any archives.

  • org.jboss.tattletale.reporting.classloader.JBossAS4ClassLoaderStructure

    A classloader structure implementation that scopes based on JBoss Application Server 4.x directory structures.

  • org.jboss.tattletale.reporting.classloader.JBossAS5ClassLoaderStructure

    A classloader structure implementation that scopes based on JBoss Application Server 5.x directory structures.

  • org.jboss.tattletale.reporting.classloader.JBossAS6ClassLoaderStructure

    A classloader structure implementation that scopes based on JBoss Application Server 6.x directory structures.

profiles Specifies a comma separated list of profiles to resolve against. The following profiles are supported:
  • java5

    The Java 5 API.

  • java6

    The Java 6 API.

  • ee5

    The Java Enterprise Edition 5 API.

  • ee6

    The Java Enterprise Edition 6 API.

  • seam22

    The JBoss Seam 2.2 API.

  • cdi10

    The Contexts and Dependency Injection (CDI) 1.0 API.

  • spring25

    The Spring 2.5 API.

  • spring30

    The Spring 3.0 API.

excludes A comma separated list of directories or files that should be excluded from the scan. F.ex.

**/server/**,myjar.jar

blacklisted A comma separated list of black listed classes or packages. F.ex.

com.mycompany.forinternaluseonly, com.partner.forinternaluseonly

scan A comma separated list of file extensions that should be scanned

Default: .jar

enableDot Should images be generated if the Graphviz DOT application is found

Default: true

graphvizDot The full path to the Graphviz DOT executable. This property is required if you want to generate PNG files and the Graphviz bin directory is not on your path. F.ex.

graphvizDot=C:\\Graphviz2.26.3\\bin\\dot.exe

or

graphvizDot=/opt/graphiz/bin/dot

The load order for the configuration file is

  1. configuration parameter in the Apache Ant / Maven task
  2. -Djboss-tattletale.properties system property
  3. jboss-tattletale.properties file in current directory
  4. jboss-tattletale.properties file in class loader

NOTE: The classloader structure feature is currently based on directory structures and may therefore fail to identify archives that should be included in the reports. If you want to be sure that all archives are included use the NoopClassLoaderStructure plugin.

3.2.1. Filtering

JBoss Tattletale supports filtering of the warnings and errors that the reports generates.

This functionality allows the user to filter out any warnings or errors that should be ignored and thereby allow the application to successful terminate.

The format of the filter properties file is

Table 3.2. JBoss Tattletale filter

KeyValue
report idThe filter

An example:

myreport=myfilter
       

The load order for the filter file is

  1. filter parameter in the Apache Ant / Maven task
  2. -Djboss-tattletale-filter.properties system property
  3. jboss-tattletale-filter.properties file in current directory

See the individual reports for filtering support.

3.3. Running

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 and the optional "outputdir" parameter is the directory where you would like your reports to be generated. The "-exclude" option let you exclude directories or file on the command line - see the configuration file for syntax.

The main file will be generated under the output directory as index.html.

JBoss Tattletale will scan for Java Archives (.JAR) files.

JBoss Tattletale requires Java Runtime Environment 5 or higher.