Maven for Eclipse.

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Maven for Eclipse is an indispensable guide to help you understand and use Maven from within Eclipse IDE using the m2eclipse plugin. By no means is it an in-depth and comprehensive resource. Rather, it's a quick and handy guide toward Maven project's development. It starts with the basics of Apache Maven; covers core concepts; and shows you how to create, import, build, run, package, and customize to generate project artifacts of Maven projects using the m2eclipse plugin inside the Eclipse IDE. What this book covers Chapter 1, Apache Maven – Introduction and Installation, provides users with a quick introduction and installation reference to Apache Maven. By the end of this chapter, users will have a Maven project running on their systems. Chapter 2, Installing m2eclipse, serves as a reference for users to install the m2eclipse plugin and also provides Maven integration for Eclipse. By the end of this chapter, users will have m2eclipse installed on their systems and ready to be used. Chapter 3, Creating and Importing Projects, starts with the Maven project structure, introduces core aspects and concepts, and guides you toward creating and importing Maven projects using the m2eclipse plugin. By the end of this chapter, users will be familiar with the core concepts of the Maven project structure, and they'll be able to create and import Maven projects. Chapter 4, Building and Running a Project, introduces users to different build lifecycles and teaches them how to view the m2eclipse console and build and run projects. By the end of this chapter, users will be familiar with the build lifecycle and will be competent at building and running projects using m2eclipse. Chapter 5, Spicing Up a Maven Project, teaches users to create a simple web application, shows ways to customize it, and provides guides on how to write and run unit tests. By end of this chapter, users will learn to create web applications using m2eclipse and change the POM file to generate reports against unit tests. Chapter 6, Creating a Multimodule Project, intends to introduce the concept of multimodule projects and teaches users to create, build, and run the project. At the end of this chapter, users will know how to create and run a multimodule Maven project using the m2eclipse plugin. Chapter 7, Peeking into m2eclipse, dives into the m2eclipse plugin and introduces different features and aspects that makes life easier. By the end of this chapter, users will be familiar with every aspect of m2eclipse and will be able to use it efficiently and with ease.

Author(s): Sanjay Shah (2014).
Series: Packt
Year: 2019

Language: English
Pages: 155

Cover......Page 1
Copyright......Page 3
Credits......Page 4
About the Author......Page 5
About the Reviewers......Page 6
www.PacktPub.com......Page 9
Table of Contents......Page 10
Preface......Page 14
Chapter 1: Apache Maven – Introduction and Installation......Page 20
Maven's principles......Page 21
Maven's component architecture......Page 22
Wagon......Page 23
Maven SCM......Page 24
Maven versus Ant......Page 25
Downloading Maven......Page 27
Installing Maven on Windows......Page 28
Verifying the installation of Maven......Page 29
Summary......Page 30
Introduction to m2eclipse......Page 32
Downloading Eclipse......Page 33
Installing and launching Eclipse......Page 34
Using Eclipse Marketplace......Page 35
Using Update Site......Page 37
Setting Maven for use......Page 40
Summary......Page 42
Chapter 3: Creating and Importing Projects......Page 44
POM (Project Object Model)......Page 45
Maven coordinates......Page 47
POM relationships......Page 49
A super POM......Page 50
Repository......Page 55
The remote repository......Page 56
Search sequence in repositories......Page 57
Dependency scopes......Page 59
Transitive dependencies......Page 60
Plugins and Goals......Page 61
Creating a Maven project......Page 62
Using an archetype......Page 63
Using no archetypes......Page 66
Checking out a Maven project......Page 68
Importing a Maven project......Page 70
Summary......Page 71
Chapter 4: Building and Running
a Project......Page 72
The default lifecycle......Page 73
The clean lifecycle......Page 74
The site lifecycle......Page 75
The package-specific lifecycle......Page 76
The Maven console......Page 77
Building and packaging projects......Page 78
Running hello-project......Page 81
Summary......Page 82
Chapter 5: Spicing Up a Maven Project......Page 84
Creating the MyDistance project......Page 85
Changing the project information......Page 88
Adding dependencies......Page 89
Adding resources......Page 91
The application code......Page 93
Adding a form to get an input......Page 94
Adding a servlet......Page 96
Running an application......Page 98
Writing unit tests......Page 100
Generating site documentation......Page 104
Generating unit tests – HTML reports......Page 107
Generating javadocs......Page 108
Summary......Page 109
Introduction......Page 110
Creating a parent project – POM......Page 112
Creating a core module......Page 115
Creating a webapp module......Page 118
Building a multimodule project......Page 122
Summary......Page 124
Chapter 7: Peeking into m2eclipse......Page 126
Other features in m2eclipse......Page 127
Add Plugin......Page 129
New Maven Module Project......Page 130
Download Source......Page 131
Open POM......Page 133
Update Project......Page 134
A form-based POM editor......Page 135
Overview......Page 136
Analyzing project dependencies......Page 137
Working with repositories......Page 140
Local Repositories......Page 141
Project Repositories......Page 142
m2eclipse preferences......Page 143
Maven......Page 144
Archetypes......Page 145
User Interface and User Settings......Page 146
Warnings......Page 147
Lifecycle Mappings......Page 148
Summary......Page 149
Index......Page 150