Java Power Tools

Af John Ferguson Smart
Detaljer O'Reilly Media, Incorporated
ISBN 9780596527938
Sprog Engelsk
Vælg mellem
Pris 499,00 kr.
Paperback

Ikke på lager

Ikke på lager. Bestil nu og få den leveret om ca. 12 hverdage

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
If you are a Java developer, these tools can help improve your development practices, and make your life easier in the process. Lead developers, software architects and people interested in the wider picture will be able to gather from these pages some useful ideas about improving your project infrastructure and best practices.



Foreword;Preface; How This Book Is Organized; Who Should Read This Book; What This Book Doesn''t Cover; Contributing Authors; Technical Reviewers; Conventions; Source Code; About the Title; Acknowledgments; Using Code Examples; Safari® Enabled; How to Contact Us;Introduction;Build Tools;
Chapter 1: Setting Up a Project Using Ant;
1.1 Ant in the Build Process;
1.2 Installing Ant;
1.3 A Gentle Introduction to Ant;
1.4 Compiling Your Java Code in Ant;
1.5 Customizing Your Build Script Using Properties;
1.6 Running Unit Tests in Ant;
1.7 Generating Documentation with Javadoc;
1.8 Packaging Your Application;
1.9 Deploying Your Application;
1.10 Bootstrapping Your Build Scripts;
1.11 Using Maven Dependencies in Ant with the Maven Tasks;
1.12 Using Ant in Eclipse;
1.13 Using Ant in NetBeans;
1.14 Manipulating XML with XMLTask;
1.15 Conclusion;
Chapter 2: Setting Up a Project Using Maven 2;
2.1 Maven and the Development Build Process;
2.2 Maven and Ant;
2.3 Installing Maven;
2.4 Declarative Builds and the Maven Project Object Model;
2.5 Understanding the Maven 2 Lifecycle;
2.6 The Maven Directory Structure;
2.7 Configuring Maven to Your Environment;
2.8 Dependency Management in Maven 2;
2.9 Looking for Dependencies with MvnRepository;
2.10 Project Inheritance and Aggregation;
2.11 Creating a Project Template with Archetypes;
2.12 Compiling Code;
2.13 Testing Your Code;
2.14 Packaging and Deploying Your Application;
2.15 Deploying an Application Using Cargo;
2.16 Using Maven in Eclipse;
2.17 Using Maven in NetBeans;
2.18 Using Plug-Ins to Customize the Build Process;
2.19 Setting Up an Enterprise Repository with Archiva;
2.20 Setting Up an Enterprise Repository Using Artifactory;
2.21 Using Ant in Maven;
2.22 Advanced Archetypes;
2.23 Using Assemblies;Version Control Tools;
Chapter 3: Setting Up Version Control Using CVS;
3.1 An Introduction to CVS;
3.2 Setting Up a CVS Repository;
3.3 Creating a New Project in CVS;
3.4 Checking Out a Project;
3.5 Working with Your Files--Updating and Committing;
3.6 Resolving a Locked Repository;
3.7 Working with Keyword Substitution;
3.8 Working with Binary Files;
3.9 Tags in CVS;
3.10 Creating Branches in CVS;
3.11 Merging Changes from a Branch;
3.12 Viewing Change History;
3.13 Reverting Changes;
3.14 Using CVS in Windows;
Chapter 4: Setting Up Version Control Using Subversion;
4.1 An Introduction to Subversion;
4.2 Installing Subversion;
4.3 Subversion Repository Types;
4.4 Setting Up a Subversion Repository;
4.5 Setting Up a New Subversion Project;
4.6 Checking Out Your Working Copy;
4.7 Importing Existing Files into Subversion;
4.8 Understanding Subversion Repository URLs;
4.9 Working with Your Files;
4.10 Seeing Where You''re At: The Status Command;
4.11 Resolving Conflicts;
4.12 Using Tags, Branches, and Merges;
4.13 Rolling Back to a Previous Revision;
4.14 Using File Locking with Binary Files;
4.15 Breaking and Stealing Locks;
4.16 Making Locked Files Read-Only with the svn:needs-lock Property;
4.17 Using Properties;
4.18 Change History in Subversion: Logging and Blaming;
4.19 Setting Up a Subversion Server with svnserve;
4.20 Setting Up a Secure svnserve Server;
4.21 Setting Up a WebDAV/DeltaV Enabled Subversion Server;
4.22 Setting Up a Secure WebDAV/DeltaV Server;
4.23 Customizing Subversion with Hook Scripts;
4.24 Installing Subversion As a Windows Service;
4.25 Backing Up and Restoring a Subversion Repository;
4.26 Using Subversion in Eclipse;
4.27 Using Subversion in NetBeans;
4.28 Using Subversion in Windows;
4.29 Defect Tracking and Change Control;
4.30 Using Subversion in Ant;
4.31 Conclusion;Continuous Integration;
Chapter 5: Setting Up a Continuous Integration Server with Continuum;
5.1 An Introduction to Continuum;
5.2 Installing a Continuum Server;
5.3 Manually Starting and Stopping the Server;
5.4 Checking the Status of the Server;
5.5 Running the Continuum Server in Verbose Mode;
5.6 Adding a Project Group;
5.7 Adding a Maven Project;
5.8 Adding an Ant Project;
5.9 Adding a Shell Project;
5.10 Managing Your Project Builds;
5.11 Managing Users;
5.12 Setting Up Notifiers;
5.13 Configuring and Scheduling Builds;
5.14 Debugging Your Builds;
5.15 Configuring the Continuum Mail Server;
5.16 Configuring the Continuum Web Site Ports;
5.17 Automatically Generating a Maven Site with Continuum;
5.18 Configuring a Manual Build Task;
5.19 Conclusion;
Chapter 6: Setting Up a Continuous Integration Server with CruiseControl;
6.1 An Introduction to CruiseControl;
6.2 Installing CruiseControl;
6.3 Configuring an Ant Project;
6.4 Keeping People Notified with Publishers;
6.5 Setting Up a Maven 2 Project in CruiseControl;
6.6 The CruiseControl Dashboard;
6.7 Third-Party Tools;
6.8 Conclusion;
Chapter 7: LuntBuild--A Web-Based Continuous Integration Server;
7.1 An Introduction to LuntBuild;
7.2 Installing LuntBuild;
7.3 Configuring the LuntBuild Server;
7.4 Adding a Project;
7.5 Using Project Variables for Version Numbering;
7.6 Build Results Diagnostics;
7.7 Using LuntBuild with Eclipse;
7.8 Reporting on Test Coverage in Luntbuild Using Cobertura;
7.9 Integrating Luntbuild with Maven;
7.10 Conclusion;
Chapter 8: Continuous Integration with Hudson;
8.1 An Introduction to Hudson;
8.2 Installing Hudson;
8.3 Managing the Hudson Home Directory;
8.4 Installing Upgrades;
8.5 Configuring Hudson;
8.6 Adding a New Build Job;
8.7 Organizing Your Jobs;
8.8 Monitoring Your Builds;
8.9 Viewing and Promoting a Particular Build;
8.10 Managing Users;
8.11 Authentication and Security;
8.12 Viewing Changes;
8.13 Hudson Plug-Ins;
8.14 Keeping Track of Test Results;
8.15 Keeping Track of Code Metrics;
8.16 Reporting on Code Coverage;
Chapter 9: Setting Up an Instant Messaging Platform with Openfire;
9.1 Instant Messaging in a Development Project;
9.2 Installing Openfire;
9.3 Setting Up Users and Accounts on Openfire;
9.4 Authenticating Users in an External Database;
9.5 Authenticating Users Against a POP3 Server;
9.6 Virtual Team Meetings with the Group Chat;
9.7 Extended Functionality with Openfire Plug-Ins;
9.8 Using Openfire with Continuum;
9.9 Using Openfire with CruiseControl;
9.10 Using Openfire with Luntbuild;
9.11 Sending Jabber Messages from a Java Application Using the Smack API;
9.12 Detecting Presence Using the Smack API;
9.13 Receiving Messages Using the Smack API;Unit Testing;
Chapter 10: Testing Your Code with JUnit;
10.1 JUnit
3.8 and JUnit 4;
10.2 Unit Testing with JUnit 4;
10.3 Setting Up and Optimizing Your Unit Test Cases;
10.4 Simple Performance Testing Using Timeouts;
10.5 Checking for Exceptions the Easy Way;
10.6 Using Parameterized Tests;
10.7 Using assertThat and the Hamcrest Library;
10.8 JUnit 4 Theories;
10.9 Using JUnit 4 with Maven 2;
10.10 Using JUnit 4 with Ant;
10.11 Selectively Running JUnit 4 Tests in Ant;
10.12 Integration Tests;
10.13 Using JUnit 4 in Eclipse;
Chapter 11: Next-Generation Testing with TestNG;
11.1 Introducing TestNG;
11.2 Creating Simple Unit Tests with TestNG;
11.3 Defining TestNG Test Suites;
11.4 The TestNG Eclipse Plug-In;
11.5 Using TestNG in Ant;
11.6 Using TestNG with Maven 2;
11.7 Managing the Test Lifecycle;
11.8 Using Test Groups;
11.9 Managing Dependencies;
11.10 Parallel Testing;
11.11 Test Parameters and Data-Driven Testing;
11.12 Checking for Exceptions;
11.13 Handling Partial Failures;
11.14 Rerunning Failed Tests;
Chapter 12: Maximizing Test Coverage with Cobertura;
12.1 Test Coverage;
12.2 Running Cobertura from Ant;
12.3 Checking the Code Coverage of TestNG Tests;
12.4 Interpreting the Cobertura Report;
12.5 Enforcing High Code Coverage;
12.6 Generating Cobertura Reports in Maven;
12.7 Integrating Coverage Tests into the Maven Build Process;
12.8 Code Coverage in Eclipse;
12.9 Conclusion;Integration, Functional, Load, and Performance Testing;
Chapter 13: Testing a Struts Application with StrutsTestCase;
13.1 Introduction;
13.2 Testing a Struts Application;
13.3 Introducing StrutsTestCase;
13.4 Mock Tests Using StrutsTestCase;
13.5 Testing Struts Error Handling;
13.6 Customizing the Test Environment;
13.7 First-Level Performance Testing;
13.8 Conclusion;
Chapter 14: Integration Testing Databases with DbUnitContributed by John Hurst;
14.1 Introduction;
14.2 Overview;
14.3 DbUnit Structure;
14.4 Example Application;
14.5 Priming the Database;
14.6 Verifying the Database;
14.7 Replacing Values;
14.8 Alternative Dataset Formats;
14.9 Dealing with Custom Data Types;
14.10 Other Applications;
Chapter 15: Performance Testing with JUnitPerf;
15.1 Introducing JUnitPerf;
15.2 Measuring Performance with TimedTests;
15.3 SimulatingLoad with LoadTests;
15.4 Load-Testing Tests That Are Not Thread-Safe;
15.5 Separating Performance Tests from Unit Tests in Ant;
15.6 Separating Performance Tests from Unit Tests in Maven;
Chapter 16: Load and Performance Testing with JMeter;
16.1 Introduction;
16.2 Installing JMeter;
16.3 Testing a Simple Web Application;
16.4 Structuring Your Test Case;
16.5 Recording and Displaying Test Results;
16.6 Using the JMeter Proxy to Record a Test Case;
16.7 Testing Using Variables;
16.8 Testing on Multiple Machines;
Chapter 17: Testing Web Services with SoapUI;
17.1 Introduction;
17.2 An Introduction to SoapUI;
17.3 Installing SoapUI;
17.4 Installing a Local Web Service;
17.5 Testing Web Services with SoapUI;
17.6 Load-Testing with SoapUI;
17.7 Running SoapUI from the Command Line;
17.8 Running SoapUI from Ant;
17.9 Running SoapUI from Maven;
17.10 Continuous Testing;
17.11 Conclusion;
Chapter 18: Profiling and Monitoring Java Applications Using the Sun JDK Tools;
18.1 The Sun JDK Profiling and Monitoring Tools;
18.2 Connecting To and Monitoring a Java Application with jConsole;
18.3 Monitoring a Remote Tomcat Application with jConsole;
18.4 Detecting and Identifying Memory Leaks with the JDK Tools;
18.5 Diagnosing Memory Leaks Using Heap Dumps, jmap, and jhat;
18.6 Detecting Deadlocks;
Chapter 19: Profiling Java Applications in Eclipse;
19.1 Profiling Applications from Within an IDE;
19.2 The Eclipse Test & Performan