ii
Copyright ............................................................................................................................................................... ix
1. Creative Commons BY-ND-NC .................................................................................................................. ix
Foreword: 0.7 ......................................................................................................................................................... xi
1. Revision History ......................................................................................................................................... xi
1.1. Changes in Edition 0.7 ..................................................................................................................... xi
1.2. Changes in Edition 0.6 ................................................................................................................... xiv
1.3. Changes in Edition 0.5 ................................................................................................................... xiv
1.4. Changes in Edition 0.4 .................................................................................................................... xv
Preface ................................................................................................................................................................ xvii
1. How to Use this Book ............................................................................................................................. xvii
2. Your Feedback ........................................................................................................................................ xvii
3. Font Conventions .................................................................................................................................... xviii
4. Maven Writing Conventions .................................................................................................................... xviii
5. Acknowledgements ................................................................................................................................... xix
1. Introducing Apache Maven .................................................................................................................................. 1
1.1. Maven... What is it? .................................................................................................................................. 1
1.2. Convention Over Configuration ................................................................................................................. 1
1.3. A Common Interface ................................................................................................................................ 2
1.4. Universal Reuse through Maven Plugins .................................................................................................... 3
1.5. Conceptual Model of a "Project" ............................................................................................................... 3
1.6. Is Maven an alternative to XYZ? ............................................................................................................... 4
1.7. Comparing Maven with Ant ...................................................................................................................... 5
1.8. Summary .................................................................................................................................................. 7
2. Installing and Running Maven ............................................................................................................................. 8
2.1. Verify your Java Installation ..................................................................................................................... 8
2.2. Downloading Maven ................................................................................................................................. 8
2.3. Installing Maven ....................................................................................................................................... 8
2.3.1. Installing Maven on Mac OSX ....................................................................................................... 9
2.3.2. Installing Maven on Microsoft Windows ....................................................................................... 10
2.3.3. Installing Maven on Linux ............................................................................................................ 10
2.3.4. Installing Maven on FreeBSD or OpenBSD ................................................................................... 10
2.4. Testing a Maven Installation .................................................................................................................... 10
2.5. Maven Installation Details ....................................................................................................................... 11
2.5.1. User-specific Configuration and Repository ................................................................................... 11
2.5.2. Upgrading a Maven Installation .................................................................................................... 12
2.5.3. Upgrading from Maven 1.x to Maven 2.x ...................................................................................... 12
2.6. Uninstalling Maven ................................................................................................................................. 13
2.7. Getting Help with Maven ........................................................................................................................ 13
2.8. Using the Maven Help Plugin .................................................................................................................. 14
2.8.1. Describing a Maven Plugin ........................................................................................................... 14
2.9. About the Apache Software License ........................................................................................................ 16
I. Maven by Example ............................................................................................................................................ 18
3. A Simple Maven Project ............................................................................................................................ 19
3.1. Introduction .................................................................................................................................... 19
3.1.1. Downloading this Chapter's Example ..................................................................................... 19