Preface

Although there are a number of references for Maven online, there is no single, well-written narrative for introducing Maven that can serve as both an authoritative reference and an introduction. What we’ve tried to do with this effort is provide such a narrative coupled with useful reference material.

Maven... What Is It?

The answer to this question depends on your own perspective. The great majority of Maven users are going to call Maven a “build tool”: a tool used to build deployable artifacts from source code. Build engineers and project managers might refer to Maven as something more comprehensive: a project management tool. What is the difference? A build tool such as Ant is focused solely on preprocessing, compilation, packaging, testing, and distribution. A project management tool such as Maven provides a superset of features found in a build tool. In addition to providing build capabilities, Maven can also run reports, generate a web site, and facilitate communication among members of a working team.

Here is a more formal definition of Apache Maven: Maven is a project management tool that encompasses a Project Object Model, a set of standards, a project lifecycle, a dependency management system, and logic for executing plugin goals at defined phases in a lifecycle. When you use Maven, you describe your project using a well-defined Project Object Model, Maven can then apply cross-cutting logic from a set of shared (or custom) plugins.

Don’t let the fact that Maven is a “project management” tool scare you away. If you are just looking for a build tool, Maven will do the job. In fact, the first few chapters of Part II will deal with the most common use case: using Maven to build and distribute your project.

Font Conventions

This book follows certain conventions for font usage. Understanding these conventions upfront makes it easier to use this book:

Italic

Used for filenames, file extensions, URLs, application names, emphasis, and new terms when they are first introduced.

Constant width

Used for Java™ class names, methods, variables, properties, data types, database elements, and snippets of code that appear in text.

Constant width bold

Used for commands you enter at the command line and to highlight new code inserted in a running example.

Constant width italic

Used to annotate output.

Maven Writing Conventions

The book follows certain conventions for naming and font usage in relation to Apache Maven. Understanding these conventions upfront makes it easier to read this book:

Compiler plugin

Maven plugins are capitalized.

create goal

Maven goal names are displayed in a constant width font.

plugin

Maven revolves around the heavy use of plugins, but you won’t find plugin defined in the dictionary. This book uses “plugin” without a hyphen because it is easier to read and write and because it is a standard throughout the Maven community.

Maven Lifecycle, Maven Standard Directory Layout, Project Object Model

Core Maven concepts are capitalized whenever they are referenced in the text.

goalParameter

A Maven goal parameter is displayed in a constant width font.

compile phase

Lifecycle phases are displayed in a constant width font.

Note

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Maven: The Definitive Guide by Sonatype. Copyright 2008 Sonatype, 978-0-596-51733-5.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

When you see a Safari® Books Online icon on the cover of your favorite technology book, that means the book is available online through the O’Reilly Network Safari Bookshelf.

Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at http://safari.oreilly.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international/local)
707-829-0104 (fax)

O’Reilly’s web page for this book, where we list errata, examples, or any additional information. You can access this page at:

http://www.oreilly.com/catalog/9780596517335

To comment or ask technical questions about this book, send email to:

For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at:

http://www.oreilly.com

Acknowledgments

Sonatype would like to thank the following contributors who have provided feedback that improved the quality of this book. Thanks to Chad Gorshing, Marcus Biel, Brian Dols, Mangalaganesh Balasubramanian, Marius Kruger, and Mark Stewart. Special thanks to Joel Costigliola for helping debug and correct the Spring web chapter. Stan Guillory was practically a contributing author given the number of corrections he posted to the book’s Get Satisfaction page. Thank you, Stan. Special thanks to Richard Coasby of Bamboo for acting as the provisional grammar consultant.

Sarah Schneider and Marlowe Shaeffer of O’Reilly Media, and Mark Jewett of Appingo, should receive medals for the extreme patience they displayed as this book continued to miss schedule after schedule. Thank you, Sarah, and the entire production department for making this book a success. Thanks to Mike Loukides and Mike Hendrickson for providing the necessary editorial oversight to make sure that we were given enough time and feedback to publish a book that will remain relevant in the months and years to come.

Thanks to all of the authors, especially Bruce Snyder, Brian Fox, John Casey, Jason van Zyl, and Eugene Kuleshov. Everyone at Sonatype played a part in the content of this book, and everyone worked together to help us create a foundation for this documentation.

Thanks to all of our contributing authors, especially Eric Redmond.

Tim O’Brien would like to thank his perfect wife, Susan, and child, Josephine.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.170.63