O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Instant Apache Maven Starter

Book Description

Get started with the fundamentals of developing Java projects with Apache Maven

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
  • Create Java projects and project templates with Maven archetypes
  • Manage project dependencies, project coordinates, and multi-modules
  • Download, install, and configure Maven on different operating systems

In Detail

Maven ultimately allows for the automation of the build lifecycle and independence from any IDE. You must always be able to build and test any Java project from the command line, using your favorite editor for coding. It is important to control exactly what libraries get distributed with Java projects and to have a standard project template and build process.

Instant Apache Maven Starter will concentrate the most useful information into one single, very compact source.

This book will help the reader to find out what Maven actually is, and will teach the reader how to create and build a new Java application or Web project from scratch and to understand the POM file and Maven project’s coordinates.

The book introduces the reader with useful information so they can quickly get started with using Maven productively through practical but very simple examples, as well as providing some useful tips.

The topics this book covers deal with setting up a local Maven environment, how to start coding and unit-testing in few minutes, and understanding the POM (Project Object Model) file and its naming conventions and internal dependencies, so that any kind of Java project can be managed uniformly and systematically.

Instant Apache Maven Starter will teach you everything you need to get started with Maven immediately with just the very essential information.

Table of Contents

  1. Instant Apache Maven Starter
    1. Instant Apache Maven Starter
    2. Credits
    3. About the Authors
    4. www.packtpub.com
      1. Support files, eBooks, discount offers and more
    5. packtlib.packtpub.com
      1. Why Subscribe?
      2. Free Access for Packt account holders
    6. 1. Instant Apache Maven Starter
      1. So, what is Maven?
      2. Installation
        1. Step 1 – prerequisites
        2. Step 2 – downloading Maven
        3. Step 3 – installing Maven
          1. Microsoft Windows
          2. Linux and Mac OS X
        4. Step 3 – verifying the installation
        5. And that's it
      3. Quick start – core concepts and commands of Maven
        1. Step 1 – understanding Maven
          1. A Maven project
          2. Super POM
          3. Artifact
          4. Minimal pom.xml
          5. Parent (also known as POM Inheritance)
          6. Plugin
          7. Repository
          8. Dependency
          9. Property
          10. Resource
        2. Step 2 – creating from an archetype
        3. Step 3 – exploring the project structure
        4. Step 4 – exploring POM
        5. Step 5 – compile, install, and run
        6. Step 6 – changing POM
        7. Step 7 – analyzing the console and fixing warnings
      4. Top 19 features you need to know about
        1. Profile
        2. Effective POM
        3. Archetype
        4. Settings
        5. Maven lifecycle
        6. Artifact resolution
        7. Dependency scope
        8. Dependency management
        9. Plugin management
        10. Multi-module projects (also known as POM Aggregation)
        11. Unit and integration testing with Maven
        12. Maven WAR overlays
        13. Remote deploy a WAR to Apache Tomcat
          1. Step 1 – editing tomcat-users.xml
          2. Step 2 – configuring authentication in settings.xml
          3. Step 3 – adding the Maven Tomcat Plugin
          4. Step 4 – deploying to Tomcat
        14. Running Tomcat embedded
        15. Multi-environment build
        16. Assembling an artifact
        17. Releasing a Maven project
        18. The Maven Enforcer Plugin
        19. Using Maven from your favourite IDE
          1. Eclipse
          2. IntelliJ IDEA
          3. NetBeans
          4. Emacs
      5. People and places you should get to know
        1. Official sites
        2. Articles and tutorials
        3. Community
        4. Blogs
        5. Twitter
        6. Maven repository managers
        7. Maven alternatives