Chapter 4. Apache Ant

JBoss Tattletale integrates with Apache Ant such that you can generate the reports directly from your build environment.

First, you need to add tattletale.jar, tattletale-ant.jar and javassist.jar to the Apache Ant classpath.

Second, you need to add the following to your project definition tag:


That is it.

Alternative, you can do a taskdef for each task

<taskdef name="report"

See the Apache Ant documentation for additional instructions on installation.

4.1. report


<tattletale:report source="${src.dir]" destination="${dest.dir}"/>

Table 4.1. Apache Ant: report

source The directory that contains the Java archives. Multiple directories can be scanned by separating each with the File.pathSeparator character - f.ex. dir1:dir2 on Un*x.

Default: Current directory

destination The directory where the reports should be generated

Default: Current directory

configuration Path to the configuration file

Default: No value

filter Path to the filter file

Default: No value

reports A comma separated list of which reports that should be generated. All reports can be selected by specifying "*". The following reports are supported:
  • classdependants

    The "Class Dependants" report.

  • classdependson

    The "Class DependsOn" 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

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.

Default: org.jboss.tattletale.reporting.classloader.NoopClassLoaderStructure

profiles Specifies a comma separated list of profiles to resolve against. All profiles can be selected by specifying "*". 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.

Default: java5, java6

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


Default: Empty list

blacklisted A comma separated list of black listed classes or packages. F.ex. com.mycompany.forinternaluseonly, com.partner.forinternaluseonly

Default: Empty list

failOnInfo Fail the build if a failed INFO report is found

Default: false

failOnWarn Fail the build if a failed WARN report is found

Default: false

failOnError Fail the build if a failed ERROR report is found

Default: false

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

Default: .jar


Note that defining a property in the task overrides the setting in the configuration file.