Free Sample
+ Collection

Maven for Eclipse

Starting
Sanjay Shah

A fast-paced guide that helps you create a continuous delivery solution by integrating Maven with an Eclipse environment
$19.99
$32.99
RRP $19.99
RRP $32.99
eBook
Print + eBook

Want this title & more?

$21.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783987122
Paperback158 pages

About This Book

  • Use m2eclipse, the Maven plugin for Eclipse, to develop Maven projects
  • Customize Maven to suit your needs, generate artifacts, and build multi-module projects
  • Simplify Maven and utilize it with a hands-on, step-by-step approach

Who This Book Is For

If you want to learn about Maven and use it from within Eclipse to develop Java projects, this is the book for you. Prior experience in developing Java projects and using the Eclipse IDE is presumed. Whether you are a beginner or an experienced developer, this book will get you up and running quickly, with a hands-on approach.

Table of Contents

Chapter 1: Apache Maven – Introduction and Installation
Introduction to Maven
Maven versus Ant
Downloading Maven
Installing Maven
Summary
Chapter 2: Installing m2eclipse
Introduction to m2eclipse
Downloading Eclipse
Installing and launching Eclipse
Setting up Maven for use
Summary
Chapter 3: Creating and Importing Projects
The Maven project structure
POM (Project Object Model)
The Maven project build architecture
Other essential concepts
Creating a Maven project
Importing a Maven project
Summary
Chapter 4: Building and Running a Project
The build lifecycle
The package-specific lifecycle
The Maven console
Building and packaging projects
Running hello-project
Summary
Chapter 5: Spicing Up a Maven Project
Creating the MyDistance project
Changing the project information
Adding dependencies
Adding resources
The application code
Running an application
Writing unit tests
Running unit tests
Generating site documentation
Generating unit tests – HTML reports
Generating javadocs
Summary
Chapter 6: Creating a Multimodule Project
Introduction
Creating a parent project – POM
Creating a core module
Creating a webapp module
Building a multimodule project
Running the application
Summary
Chapter 7: Peeking into m2eclipse
Other features in m2eclipse
A form-based POM editor
Analyzing project dependencies
Working with repositories
m2eclipse preferences
Summary

What You Will Learn

  • Install Maven and m2eclipse
  • Get to grips with the Maven architecture and the core concepts of Maven
  • Understand the Maven project structure and build lifecycle
  • Create Maven projects with and without archetypes
  • Unit tests and generate reports in different formats
  • Customize Maven to fit your needs by adding various dependencies and resources
  • Make, build, and execute multimodule projects
  • Explore the m2eclipse plugin and how it can be customized

In Detail

Starting with an exploration of the Maven architecture and its installation, you will then learn how to install m2eclipse, which provides Maven integration with Eclipse. Furthermore, the book guides you through the stages of project creation, including building, testing, and executing the projects.

You will learn to customize your projects by demonstrating different core concepts of the Maven project structure. Nevertheless, you will also become familiar with the build lifecycles that generate the required artifacts. Moreover, it will also guide you through the process of handling multimodule projects and working with them effectively.

By the end of this book, you will have a good understanding of m2eclipse and will be able to use it efficiently with ease.

Authors

Read More