JBoss Tattletale 1.1 Developer's Guide

Similar documents
JBoss Tattletale. Betraying all your project's naughty little secrets

About me. Jesper Pedersen. Project lead for. Chairman for Boston JBoss User Group. Core developer, JBoss by Red Hat

Tattletale. What is Tattletale? Enterprise archives JBoss Application Server 7 Putting it all together Roadmap

Class Dependency Analyzer CDA Developer Guide

Full Control and Transparency Advanced Troubleshooting and Testing. Josh West & Andrew Dinn

Exceptions and Libraries

An Integrated Approach to Managing Windchill Customizations. Todd Baltes Lead PLM Technical Architect SRAM

Getting Started Guide

Module Road Map. 7. Version Control with Subversion Introduction Terminology

RASP Library for Java Version 2.0.0

Tuesday, April 26, 2011

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists

Lecture (01) Getting started. Dr. Ahmed ElShafee

1. The Apache Derby database

Build Automation Kurt Christensen

Chapter Two Bonus Lesson: JavaDoc

Maven Introduction to Concepts: POM, Dependencies, Plugins, Phases

What s NetBeans? Like Eclipse:

Before you start working with Java, you need to set up a Java development

ASSIGNMENT 5 Objects, Files, and More Garage Management

Embedding Graphics in JavaDocs (netbeans IDE)

Java Programming. Manuel Oriol, March 22nd, 2007

Hello Gradle. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

Wednesday, June 23, JBoss Users & Developers Conference. Boston:2010

AppDev StudioTM 3.2 SAS. Migration Guide

Abstract. Avaya Solution & Interoperability Test Lab

Certified Core Java Developer VS-1036

Agenda. Announcements. Extreme Java G Session 2 - Main Theme Java Tools and Software Engineering Techniques

Getting Started. Table of contents

Users Guide. Table of contents

Directory structure and development environment set up

Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

JADE development for CDC on COMBO Setting up the tool chain

NetBeans IDE Java Quick Start Tutorial

ASSIGNMENT 5 Objects, Files, and a Music Player

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Hello Maven. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

Developer s Guide. Version Copyright 2007 MGH

3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS)

CSE 403 Lecture 11. Static Code Analysis. Reading: IEEE Xplore, "Using Static Analysis to Find Bugs"

JBoss IDE Quick Start Guide

KonaKart Tile Portlets for Liferay. 24th January DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

CodeCharge Studio Java Deployment Guide Table of contents

MAVEN INTERVIEW QUESTIONS

JBoss Transactions 4.2.2

vsphere Web Client SDK Documentation VMware vsphere Web Client SDK VMware ESXi vcenter Server 6.5.1

This tutorial explains how you can use Gradle as a build automation tool for Java as well as Groovy projects.

Lecture 10 Declarations and Scope

i2b2 Workbench Developer s Guide: Eclipse Neon & i2b2 Source Code

Our second exam is Thursday, November 10. Note that it will not be possible to get all the homework submissions graded before the exam.

[ANALYSIS ASSIGNMENT 10]

Javadocing in Netbeans (rev )

APIs - what are they, really? Web API, Programming libraries, third party APIs etc

Red Hat JBoss Fuse 6.1

Checking Out and Building Felix with NetBeans

Dynamic code downloading using Java TM (Using the java.rmi.server.codebase Property)

Liferay Portal 4 - Development in the Extension Environment. Joseph Shum Alexander Chow Redmond Mar Jorge Ferrer

CSE 421 Course Overview and Introduction to Java

Dynamic Class Loading

EMC Documentum Composer

Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat

C++ Binary Dependency Management with Gradle. Hugh Greene

Build Tools. Software Engineering SS A tool was needed. Agenda for today. Build tools. Software complexity. Build tools

Javac and Eclipse tutorial

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

Build Tools. Software Engineering SS 2007

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Red Hat JBoss Fuse 6.1

J A D E Te s t S u i t e

CSE 142 Su 04 Computer Programming 1 - Java. Objects

Software Development. COMP220/COMP285 Seb Coope Ant: Structured Build

Thomas Pelaia II, Ph.D. XAL Workshop 2012 December 13, 2012 Managed by UT-Battelle for the Department of Energy

Getting started with Geomajas. Geomajas Developers and Geosparc

This assignment requires that you complete the following tasks (in no particular order).

Gradle Leveraging Groovy for Building Java Applications. Hans Dockter Gradle Project Lead

Javadoc short tutorial

SDK Developer s Guide

Red Hat Application Migration Toolkit 4.1

Snowdrop 1.0 User Guide

Java Error Applet Tag Missing Code Parameter Jnlp

esdk Storage Plugins 1.0.RC4 Compilation Guide 01(vRO) Issue 01 Date HUAWEI TECHNOLOGIES CO., LTD.

Write for your audience

I18N Messages and Logging

CHAPTER 6. Java Project Configuration

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 29, 2010

An Introduction to Ant

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

KU Compilerbau - Programming Assignment

Informatica Cloud Platform Building Connectors with the Toolkit Student Lab: Prerequisite Installations. Version Connectors Toolkit Training

<put document name here> 1/13

Abstract. Avaya Solution & Interoperability Test Lab

APCS Semester #1 Final Exam Practice Problems

BoardCAD developer guide

Note : That the code coverage tool is not available for Java CAPS Repository based projects.

If you don t have the JDK, you will need to install it. 1. Go to

COMP220/285 Lab sessions 1-3

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 12, 2011

How To Get Database Schema In Java Using >>>CLICK HERE<<<

Component based Development. Table of Contents. Notes. Notes. Notes. Web Application Development. Zsolt Tóth

Some Virgo Repositories. steve powell -

Transcription:

JBoss Tattletale 1.1 Developer's Guide Betraying all your project's naughty little secrets Copyright 2009 Red Hat Middleware

Table of Contents 1. About JBoss Tattletale...1 1.1. The team...1 1.2. Thanks to...1 2. Introduction...2 3. Building...3 3.1. Prerequisites...3 3.1.1. Java Development Kit (JDK)...3 3.1.2. Apache Ant...3 3.1.3. Apache Ivy...3 3.1.4. Subversion...3 3.2. Obtaining the source code...4 3.2.1. Anonymous SVN access...4 3.2.2. Developer SVN access...4 3.2.3. SVN modules...4 3.3. Compiling the source code...4 4. Coding...6 4.1. Source code formatting...6 4.2. Adding a new report...6 4.3. Adding a new classloader structure...7 ii

1 About JBoss Tattletale 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. 1.1. The team Jesper Pedersen acts as the lead for the JBoss Tattletale project. He can be reached at jesper (dot) pedersen (at) jboss (dot) org. 1.2. Thanks to Jay Balunas, Torben Jaeger, Steve Taranto and James Cobb. 1

2 Introduction 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/. 2

3 Building 3.1. Prerequisites 3.1.1. Java Development Kit (JDK) 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 3.1.2. Apache Ant 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 3.1.3. Apache Ivy JBoss Tattletale uses Apache Ivy for dependency management. The build environment automatically bootstrap the installation of Apache Ivy. 3.1.4. Subversion 3

Building You must have Subversion 1.5+ installed on your system. Remember to ensure that "svn" are in your path (or symlinked). 3.2. Obtaining the source code 3.2.1. Anonymous SVN access The anonymous SVN repository is located under: svn co http://anonsvn.jboss.org/repos/tattletale/ tattletale-trunk 3.2.2. Developer SVN access The developer SVN repository is located under: svn co https://svn.jboss.org/repos/tattletale/trunk/ tattletale-trunk 3.2.3. SVN modules We have the following modules for the project: trunk The head of development targeting the next upcoming release. 3.3. Compiling the source code In order to build the JBoss Tattletale project you execute: ant <target> where target is one of dist Builds the distribution. release 4

Building 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. 5

4 Coding 4.1. Source code formatting 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. 4.2. Adding a new report 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: 6

Coding 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. 4.3. Adding a new classloader structure 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. 7

Coding The plugin is loaded through the 'classloader' key in jboss-tattletale.properties file. See the user guide for more information. 8