Using Maven Dependencies in Ant with the Maven Tasks
Using Ant in Eclipse
Using Ant in NetBeans
Manipulating XML with XMLTask
Conclusion
Chapter 2 Setting Up a Project Using Maven 2
Maven and the Development Build Process
Maven and Ant
Installing Maven
Declarative Builds and the Maven Project Object Model
Understanding the Maven 2 Lifecycle
The Maven Directory Structure
Configuring Maven to Your Environment
Dependency Management in Maven 2
Looking for Dependencies with MvnRepository
Project Inheritance and Aggregation
Creating a Project Template with Archetypes
Compiling Code
Testing Your Code
Packaging and Deploying Your Application
Deploying an Application Using Cargo
Using Maven in Eclipse
Using Maven in NetBeans
Using Plug-Ins to Customize the Build Process
Setting Up an Enterprise Repository with Archiva
Setting Up an Enterprise Repository Using Artifactory
Using Ant in Maven
Advanced Archetypes
Using Assemblies
Version Control Tools
Chapter 3 Setting Up Version Control Using CVS
An Introduction to CVS
Setting Up a CVS Repository
Creating a New Project in CVS
Checking Out a Project
Working with Your Files—Updating and Committing
Resolving a Locked Repository
Working with Keyword Substitution
Working with Binary Files
Tags in CVS
Creating Branches in CVS
Merging Changes from a Branch
Viewing Change History
Reverting Changes
Using CVS in Windows
Chapter 4 Setting Up Version Control Using Subversion
An Introduction to Subversion
Installing Subversion
Subversion Repository Types
Setting Up a Subversion
Repository
Setting Up a New Subversion Project
Checking Out Your Working Copy
Importing Existing Files into
Subversion
Understanding Subversion Repository URLs
Working with Your Files
Seeing Where You’re At: The Status Command
Resolving Conflicts
Using Tags, Branches, and Merges
Rolling Back to a Previous Revision
Using File Locking with Binary Files
Breaking and Stealing Locks
Making Locked Files Read-Only with the svn:needs-lock
Property
Using Properties
Change History in Subversion: Logging and Blaming
Setting Up a Subversion Server with
svnserve
Setting Up a Secure svnserve Server
Setting Up a WebDAV/DeltaV Enabled Subversion Server
Setting Up a Secure WebDAV/DeltaV Server
Customizing Subversion with Hook Scripts
Installing Subversion As a Windows
Service
Backing Up and Restoring a Subversion Repository
Using Subversion in Eclipse
Using Subversion in NetBeans
Using Subversion in Windows
Defect Tracking and Change Control
Using Subversion in Ant
Conclusion
Continuous Integration
Chapter 5 Setting Up a Continuous Integration Server with Continuum
An Introduction to Continuum
Installing a Continuum Server
Manually Starting and Stopping the Server
Checking the Status of the Server
Running the Continuum Server in Verbose Mode
Adding a Project Group
Adding a Maven Project
Adding an Ant Project
Adding a Shell Project
Managing Your Project Builds
Managing Users
Setting Up Notifiers
Configuring and Scheduling Builds
Debugging Your Builds
Configuring the Continuum Mail Server
Configuring the Continuum Web Site Ports
Automatically Generating a Maven Site with Continuum
Configuring a Manual Build Task
Conclusion
Chapter 6 Setting Up a Continuous Integration Server with CruiseControl
An Introduction to CruiseControl
Installing CruiseControl
Configuring an Ant Project
Keeping People Notified with Publishers
Setting Up a Maven 2 Project in CruiseControl
The CruiseControl Dashboard
Third-Party Tools
Conclusion
Chapter 7 LuntBuild—A Web-Based Continuous Integration Server
An Introduction to LuntBuild
Installing LuntBuild
Configuring the LuntBuild Server
Adding a Project
Using Project Variables for Version Numbering
Build Results Diagnostics
Using LuntBuild with Eclipse
Reporting on Test Coverage in Luntbuild Using Cobertura
Integrating Luntbuild with Maven
Conclusion
Chapter 8 Continuous Integration with Hudson
An Introduction to Hudson
Installing Hudson
Managing the Hudson Home Directory
Installing Upgrades
Configuring Hudson
Adding a New Build Job
Organizing Your Jobs
Monitoring Your Builds
Viewing and Promoting a Particular Build
Managing Users
Authentication and Security
Viewing Changes
Hudson Plug-Ins
Keeping Track of Test Results
Keeping Track of Code Metrics
Reporting on Code Coverage
Chapter 9 Setting Up an Instant Messaging Platform with Openfire
Instant Messaging in a Development
Project
Installing Openfire
Setting Up Users and Accounts on Openfire
Authenticating Users in an External Database
Authenticating Users Against a POP3 Server
Virtual Team Meetings with the Group Chat
Extended Functionality with Openfire Plug-Ins
Using Openfire with Continuum
Using Openfire with CruiseControl
Using Openfire with Luntbuild
Sending Jabber Messages from a Java Application Using the Smack
API
Detecting Presence Using the Smack API
Receiving Messages Using the Smack API
Unit Testing
Chapter 10 Testing Your Code with JUnit
JUnit 3.8 and JUnit 4
Unit Testing with JUnit 4
Setting Up and Optimizing Your Unit Test Cases
Simple Performance Testing Using Timeouts
Checking for Exceptions the Easy Way
Using Parameterized Tests
Using assertThat and the Hamcrest Library
JUnit 4 Theories
Using JUnit 4 with Maven 2
Using JUnit 4 with Ant
Selectively Running JUnit 4 Tests in Ant
Integration Tests
Using JUnit 4 in Eclipse
Chapter 11 Next-Generation Testing with TestNG
Introducing TestNG
Creating Simple Unit Tests with TestNG
Defining TestNG Test Suites
The TestNG Eclipse Plug-In
Using TestNG in Ant
Using TestNG with Maven 2
Managing the Test Lifecycle
Using Test Groups
Managing Dependencies
Parallel Testing
Test Parameters and Data-Driven Testing
Checking for Exceptions
Handling Partial Failures
Rerunning Failed Tests
Chapter 12 Maximizing Test Coverage with Cobertura
Test Coverage
Running Cobertura from Ant
Checking the Code Coverage of TestNG Tests
Interpreting the Cobertura Report
Enforcing High Code Coverage
Generating Cobertura Reports in Maven
Integrating Coverage Tests into the Maven Build Process
Code Coverage in Eclipse
Conclusion
Integration, Functional, Load, and Performance Testing
Chapter 13 Testing a Struts Application with StrutsTestCase
Introduction
Testing a Struts Application
Introducing StrutsTestCase
Mock Tests Using StrutsTestCase
Testing Struts Error Handling
Customizing the Test Environment
First-Level Performance Testing
Conclusion
Chapter 14 Integration Testing Databases with DbUnitContributed by John Hurst
Introduction
Overview
DbUnit Structure
Example Application
Priming the Database
Verifying the Database
Replacing Values
Alternative Dataset Formats
Dealing with Custom Data Types
Other Applications
Chapter 15 Performance Testing with JUnitPerf
Introducing JUnitPerf
Measuring Performance with TimedTests
SimulatingLoad with LoadTests
Load-Testing Tests That Are Not Thread-Safe
Separating Performance Tests from Unit Tests in Ant
Separating Performance Tests from Unit Tests in Maven
Chapter 16 Load and Performance Testing with JMeter
Introduction
Installing JMeter
Testing a Simple Web Application
Structuring Your Test Case
Recording and Displaying Test Results
Using the JMeter Proxy to Record a Test Case
Testing Using Variables
Testing on Multiple Machines
Chapter 17 Testing Web Services with SoapUI
Introduction
An Introduction to SoapUI
Installing SoapUI
Installing a Local Web Service
Testing Web Services with SoapUI
Load-Testing with SoapUI
Running SoapUI from the Command Line
Running SoapUI from Ant
Running SoapUI from Maven
Continuous Testing
Conclusion
Chapter 18 Profiling and Monitoring Java Applications Using the Sun JDK
Tools
The Sun JDK Profiling and Monitoring Tools
Connecting To and Monitoring a Java Application with
jConsole
Monitoring a Remote Tomcat Application with jConsole
Detecting and Identifying Memory Leaks with the JDK Tools
Diagnosing Memory Leaks Using Heap Dumps, jmap, and jhat
Detecting Deadlocks
Chapter 19 Profiling Java Applications in Eclipse
Profiling Applications from Within an IDE
The Eclipse Test & Performance Tools Platform
Installing TPTP
TPTP and Java 6
Basic Profiling with TPTP
Studying Memory Use with the Basic Memory Analysis Results
Analyzing Execution Time
Displaying Coverage Statistics
Using Filters to Refine Your Results
Profiling a Web Application
Conclusion
Chapter 20 Testing Your User Interfaces
Introduction
Testing Your Web Application with Selenium
Testing Swing GUIs with FEST
Conclusion
Quality Metrics Tools
Chapter 21 Detecting and Enforcing Coding Standards with CheckstyleSome of the material in this chapter appeared in it’s first
incarnation on www.devx.com on the 29th of March 2006, in the article
“Maintain Better Coding Standards with Ease Using Checkstyle”
Using Checkstyle to Enforce Coding Standards
Using Checkstyle in Eclipse
Customizing Checkstyle Rules in Eclipse
Customizing Checkstyle Rules Using the XML Configuration
Files
Customizing Checkstyle: Common Rules That You Can Do Without, and
Some That You Could Use
Defining Rules for Source Code Headers with Checkstyle
Suppressing Checkstyle Tests
Using Checkstyle with Ant
Using Checkstyle with Maven
Chapter 22 Preemptive Error Detection with PMDSome of the material in this chapter appeared in it’s first
incarnation on www.devx.com on the 20th of April 2006, in the article
“PMD Squashes Code Bugs”
PMD and Static Code Analysis
Using PMD in Eclipse
Configuring PMD Rules in Eclipse
More on the PMD Rulesets
Writing Your Own PMD Ruleset
Generating a PMD Report in Eclipse
Suppressing PMD Rules
Detecting Cut-and-Paste with CPD
Using PMD in Ant
Using PMD in Maven
Chapter 23 Preemptive Error Detection with FindBugs
FindBugs: A Specialized Bug Killer
Using FindBugs in Eclipse
Selectively Suppressing Rules with FindBug Filters
Using FindBugs Annotations
Using FindBugs in Ant
Using FindBugs in Maven
Conclusion
Chapter 24 Inspecting the Results—Semiautomated Code Review with
JupiterThis work was originally published on the DevX website on June 8,
2006, under the title “Peer Code Reviews Made Easy with Eclipse
Plug-In”.
Introducing Jupiter—A Code Review Tool for Eclipse
Installing Jupiter in Eclipse
Understanding the Jupiter Code Review Process
Conducting Personal Code Reviews
Configuration
Setting Up Default Configuration Values
Individual Reviews
Team Review
Rework Phase
Jupiter Behind the Scenes
Conclusion
Chapter 25 Sharpen Your Focus with Mylyn
Introduction to Mylyn
Installing Mylyn
Tracking Tasks and Issues
Interacting with Task Repositories
Focusing on a Task with Context Management
Using the Eclipse Change Sets
Sharing Context with Other Developers
Conclusion
Chapter 26 Monitoring Build Statistics
Introduction
QALab
Source Code Management Metrics with StatSCM
Statistics in Ant with StatSVN
Issue Management Tools
Chapter 27 Bugzilla
An Introduction to Bugzilla
Installing Bugzilla
Setting Up Your Bugzilla Environment
Managing User Accounts
Restricting Access Using User Groups
Configuring a Product
Tracking Progress with Milestones
Managing Groups of Products with Classifications
Searching for Bugs
Creating a New Bug
The Lifecycle of a Bugzilla Bug
Scheduling Notifications (Whining)
Customizing Fields in Bugzilla
Conclusion
Chapter 28 Trac—Lightweight Project Management
An Introduction to Trac
Installing Trac
Setting Up a Trac Project
Running Trac on the Standalone Server
Setting Up Tracd As a Windows Service
Installing Trac on an Apache Server
Administrating the Trac Site
Managing User Accounts
Tailoring the Trac Web Site: Using the Wiki Function
Using the Trac Ticket Management System
Updating Trac Issues from Subversion
Customizing Trac Ticket Fields
Setting Up Email Notifications
Reporting Using Trac Queries and Reports
Managing Progress with Trac Roadmaps and Timelines
Browsing the Source Code Repository
Using RSS and ICalendar
Customizing a Wiki Page with Python
Conclusion
Technical Documentation Tools
Chapter 29 Team Communication with the Maven
2 Project Web SiteSome of the material in this chapter was originally published on
JavaWorld in the article “Get the most out of Maven 2 site generation”
(http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven_p.html).
The Maven 2 Project Web Site As a Communication Tool