Book description
All true craftsmen need the best tools to do their finest work, and programmers are no different. Java Power Tools delivers 30 open source tools designed to improve the development practices of Java developers in any size team or organization. Each chapter includes a series of short articles about one particular tool -- whether it's for build systems, version control, or other aspects of the development process -- giving you the equivalent of 30 short reference books in one package.
No matter which development method your team chooses, whether it's Agile, RUP, XP, SCRUM, or one of many others available, Java Power Tools provides practical techniques and tools to help you optimize the process. The book discusses key Java development problem areas and best practices, and focuses on open source tools that can help increase productivity in each area of the development cycle, including:
- Build tools including Ant and Maven 2
- Version control tools such as CVS and Subversion, the two most prominent open source tools
- Quality metrics tools that measure different aspects of code quality, including CheckStyle, PMD, FindBugs and Jupiter
- Technical documentation tools that can help you generate good technical documentation without spending too much effort writing and maintaining it
- Unit Testing tools including JUnit 4, TestNG, and the open source coverage tool Cobertura
- Integration, Load and Performance Testing to integrate performance tests into unit tests, load-test your application, and automatically test web services, Swing interfaces and web interfaces
- Issue management tools including Bugzilla and Trac
- Continuous Integration tools such as Continuum, Cruise Control, LuntBuild and Hudson
Publisher resources
Table of contents
- Dedication
- Foreword
- Preface
- Introduction
-
I. Build Tools
-
1. Setting Up a Project Using Ant
- Ant in the Build Process
- Installing Ant
- A Gentle Introduction to Ant
- Compiling Your Java Code in Ant
- Customizing Your Build Script Using Properties
- Running Unit Tests in Ant
- Generating Documentation with Javadoc
- Packaging Your Application
- Deploying Your Application
- Bootstrapping Your Build Scripts
- Using Maven Dependencies in Ant with the Maven Tasks
- Using Ant in Eclipse
- Using Ant in NetBeans
- Manipulating XML with XMLTask
- Conclusion
-
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
-
1. Setting Up a Project Using Ant
-
II. Version Control Tools
-
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
-
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
-
3. Setting Up Version Control Using CVS
-
III. Continuous Integration
-
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
- 6. Setting Up a Continuous Integration Server with CruiseControl
-
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
-
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
-
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
-
5. Setting Up a Continuous Integration Server with Continuum
-
IV. Unit Testing
-
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
-
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
- 12. Maximizing Test Coverage with Cobertura
-
10. Testing Your Code with JUnit
-
V. Integration, Functional, Load, and Performance Testing
- 13. Testing a Struts Application with StrutsTestCase
- 14. Integration Testing Databases with DbUnit
- 15. Performance Testing with JUnitPerf
- 16. Load and Performance Testing with JMeter
- 17. Testing Web Services with SoapUI
- 18. Profiling and Monitoring Java Applications Using the Sun JDK Tools
-
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
- 20. Testing Your User Interfaces
-
VI. Quality Metrics Tools
-
21. Detecting and Enforcing Coding Standards with 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
- 22. Preemptive Error Detection with PMD
- 23. Preemptive Error Detection with FindBugs
- 24. Inspecting the Results—Semiautomated Code Review with Jupiter
- 25. Sharpen Your Focus with Mylyn
- 26. Monitoring Build Statistics
-
21. Detecting and Enforcing Coding Standards with Checkstyle
-
VII. Issue Management Tools
-
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
-
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
-
27. Bugzilla
-
VIII. Technical Documentation Tools
-
29. Team Communication with the Maven 2 Project
Web Site
- The Maven 2 Project Web Site As a Communication Tool
- Setting Up a Maven Site Project
- Integrating Reports into Your Site
- Creating a Dedicated Maven Site Project
- Defining the Site Outline
- The Maven Site Generation Architecture
- Using Snippets
- Customizing the Look and Feel of Your Site
- Distributing Your Site
- 30. Automatically Generating Technical Documentation
-
29. Team Communication with the Maven 2 Project
Web Site
- Bibliography
- Index
- About the Author
- Colophon
- Copyright
Product information
- Title: Java Power Tools
- Author(s):
- Release date: April 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491954546
You might also like
book
Java Projects - Second Edition
Learn how to build scalable, resilient, and effective applications in Java that suit your software requirements. …
book
AspectJ Cookbook
When Object Oriented programming (OO) first appeared, it was a revelation. OO gave developers the ability …
book
Java Servlet & JSP Cookbook
With literally hundreds of examples and thousands of lines of code, the Java Servlet and JSP …
book
Ant: The Definitive Guide
Ant is the premiere build management tool for use in Java environments. Unlike traditional build management …