Apache Maven Dependency Management

Apache Maven Dependency Management
eBook: $20.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $55.98    Print cover: $34.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Improve your productivity by efficiently managing dependencies.
  • Learn how to detect and fix dependency conflicts
  • Learn how to share transitive relations and to visualize your dependencies

Book Details

Language : English
Paperback : 158 pages [ 235mm x 191mm ]
Release Date : October 2013
ISBN : 1783283017
ISBN 13 : 9781783283019
Author(s) : Jonathan Lalou
Topics and Technologies : All Books, Game Development, Open Source

Table of Contents

Chapter 1: Basic Dependency Management
Chapter 2: Dependency Mechanism and Scopes
Chapter 3: Dependency Designation (advanced)
Chapter 4: Migration of Dependencies to Apache Maven
Chapter 5: Tools within Your IDE
Chapter 6: Release and Distribute
Appendix: Useful Public Repositories
  • Chapter 1: Basic Dependency Management
    • Nomenclature
      • Reminders on Maven origins
      • Dependency
    • Long and short designations
      • Long designation
      • Short designation
    • Visualizing dependencies
    • Transitive dependencies
      • The Concept of transitivity
      • Resolution
      • Exclusions
      • Optional dependencies
    • Parents/modules
      • Parent POM
      • Modules
    • Version ranges
    • Summary
    • Chapter 2: Dependency Mechanism and Scopes
      • Scopes
        • Nomenclature of scope
          • Compile
          • Provided
          • Runtime
          • Test
          • System
          • Import
        • Scope overlay rules (via transitive dependencies)
        • The dependencyManagement tag
          • First case study
          • Second case study
        • The import scope
      • Modules and submodules (advanced)
        • Maven Reactor
          • Reactor sorting
        • Reactor options and the Reactor plugin for Maven 2
      • Management of dependencies in folders
        • The dependencies in their folders
        • Nonarchive files
      • Summary
      • Chapter 3: Dependency Designation (advanced)
        • The type tag
          • The classic cases
        • Creating a new packaging/type
          • Case study
            • The first step – Maven plugin
            • The second step – call the plugin
        • The Classifier
        • The dependency plugin
          • The analyze goal
          • Classpath
          • Other goals of dependency
          • Other miscellaneous plugins
          • The Enforce plugin
            • The dependency convergence
            • Banned dependencies
            • Other rules
          • Tattletale
            • Dependencies
            • Reports
            • Archives
          • Dependency, enforce, and tattletale – conclusion
        • Dynamic POMs and dependencies
          • Effective POM and settings
          • Dynamic POM
          • Case study
          • A quick and dirty solution
          • A clean solution
            • With properties in command lines
            • Profiles and settings
            • Dynamic POMs – conclusion
        • Summary
        • Chapter 4: Migration of Dependencies to Apache Maven
          • Case study
          • Setting the folders
          • Introducing Maven with standard libraries
            • Available POM
            • Unavailable POM
              • Disclosing information from Manifest.MF
              • Online tools
              • Checksums
            • Next steps
          • Non-Maven standard libraries
            • State
              • Quick and (very) dirty
              • (A bit) slower and (far) cleaner
          • Summary
          • Chapter 5: Tools within Your IDE
            • Case study
            • IntelliJ IDEA
              • XML with XSD completion
              • Module Dependency Graph
              • Dependency addition
                • Dependency addition from Java code
                • Dependency search and generation within a POM
              • Conclusion on IntelliJ IDEA
            • Eclipse
              • Dependency view
              • Dependency Hierarchy view
              • Effective POM view
              • Maven Repository view
              • Conclusion on Eclipse
            • NetBeans
              • Overview
              • Dependency addition
            • Summary
            • Chapter 6: Release and Distribute
              • Best practices before release
              • Fixing conflicts with tier-parties
              • Releasing the source code
                • The Maven Release plugin
              • Delivering artifacts and distributions
                • Artifacts
                • Release distribution
                  • A simple case
                  • A complex case
              • Distribution management
              • Summary

                Jonathan Lalou

                Jonathan is an engineer who has been fascinated by new technologies, computer sciences, and the digital world ever since his childhood. As a graduate of the Ecole des Mines–one of the best French polytechnic institutes, Jonathan has more than 13 years of experience in Java and JEE ecosystems.

                Jonathan has worked for several global companies and financial institutions–Syred, Philips, Sungard, Ixis CIB, BNP Paribas, Amundi AM–with whom he maintains strong ties and daily contacts. During his career, Jonathan has successfully progressed through many levels of his industry, working as a developer, architect, Scrum master, team leader, and project manager. Now, Jonathan has joined StepInfo (http://www.stepinfo.com/), a high-tech company focused on Java and the sponsor of local JUG and Devoxx, where he works as a project director, trainer, and leader of “expert task forces.”

                Jonathan’s skills include advanced knowledge of a wide range of technologies and frameworks: Spring, Hibernate, GWT, Mule ESB, Struts, JSF, Groovy, Android, EJB, JMS, application servers, agile methods, and of course, Apache Maven. Jonathan is available on the cloud… Blog: http://jonathan.lalou.free.fr Twitter: http://twitter.com/john_the_cowboy LinkedIn: http://www.linkedin.com/in/jonathanlalou

                Sorry, we don't have any reviews for this title yet.

                Code Downloads

                Download the code and support files for this book.

                Submit Errata

                Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                - 2 submitted: last submission 30 Apr 2014

                Errata type: Code | Page number: 12


                The line: <!--implicit dependency to commons-io: commons-io:1.0-->

                Should be: <!--implicit dependency to commons-io: commons-io:0.9.3-->

                Errata type: Code | Page number: 31

                 In the source code, the folder:

                Should have been renamed as:

                Sample chapters

                You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                Frequently bought together

                Apache Maven Dependency Management +    Microsoft Dynamics GP 2013 Financial Management =
                50% Off
                the second eBook
                Price for both: $30.90

                Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                What you will learn from this book

                • Learn how to use profiles, POM, parent POM, and modules
                • Increase build-speed and decrease archive size
                • Set, rationalize, and exclude transitive dependencies
                • Optimize your POM and its dependencies
                • Migrate projects to Maven including projects with exotic dependencies

                In Detail

                Managing dependencies in a multi-module project is difficult. In a multi-module project, libraries need to share transitive relations with each other. Maven eliminates this need by reading the project files of dependencies to figure out their inter-relations and other related information. Gaining an understanding of project dependencies will allow you to fully utilize Maven and use it to your advantage.

                Aiming to give you a clear understanding of Maven’s functionality, this book focuses on specific case studies that shed light on highly useful Maven features which are often disregarded. The content of this book will help you to replace homebrew processes with more automated solutions.

                This practical guide focuses on the variety of problems and issues which occur during the conception and development phase, with the aim of making dependency management as effortless and painless as possible. Throughout the course of this book, you will learn how to migrate from non-Maven projects to Maven, learn Maven best practices, and how to simplify the management of multiple projects. The book emphasizes the importance of projects as well as identifying and fixing potential conflicts before they become issues. The later sections of the book introduce you to the methods that you can use to increase your team’s productivity. This book is the perfect guide to help make you into a proud software craftsman.


                An easy-to-follow, tutorial-based guide with chapters progressing from basic to advanced dependency management.

                Who this book is for

                If you are working with Java or Java EE projects and you want to take advantage of Maven dependency management, then this book is ideal for you. This book is also particularly useful if you are a developer or an architect. You should be well versed with Maven and its basic functionalities if you wish to get the most out of this book.

                Code Download and Errata
                Packt Anytime, Anywhere
                Register Books
                Print Upgrades
                eBook Downloads
                Video Support
                Contact Us
                Awards Voting Nominations Previous Winners
                Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software