Maven Essentials
eBook - ePub

Maven Essentials

Prabath Siriwardena

Partager le livre
  1. 184 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Maven Essentials

Prabath Siriwardena

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Get started with the essentials of Apache Maven and get your build automation system up and running quickly

About This Book

  • Explore the essentials of Apache Maven essentials to arm yourself with all the ingredients needed to develop a comprehensive build automation system
  • Identify the extension points in Apache Maven and learn more about them in-depth
  • Improve developer productivity by optimizing the build process with best practices in Maven using this compact guide

Who This Book Is For

The book is ideal for for experienced developers who are already familiar with build automation, but want to learn how to use Maven and apply its concepts to the most difficult scenarios in build automation.

What You Will Learn

  • Comprehend the key concepts in Apache Maven
  • Build your own custom plugins and get to know how Maven extension points are used
  • Troubleshoot build issues with greater confidence
  • Optimize Maven's configuration settings
  • Write custom lifecycles and extensions
  • Get hands-on and create a Maven assembly
  • Explore the best practices to design a build system that improves developer productivity

In Detail

Maven is the #1 build tool used by developers and it has been around for more than a decade. Maven stands out among other build tools due to its extremely extensible architecture, which is built on of the concept of convention over configuration. It's widely used by many open source Java projects under Apache Software Foundation, Sourceforge, Google Code, and more.

Maven Essentials is a fast-paced guide to show you the key concepts in Maven and build automation. We get started by introducing you to Maven and exploring its core concepts and architecture. Next, you will learn about and write a Project Object Model (POM) while creating your own Maven project. You will also find out how to create custom archetypes and plugins to establish the most common goals in build automation. After this, you'll get to know how to design the build to prevent any maintenance nightmares, with proper dependency management. We then explore Maven build lifecycles and Maven assemblies. Finally, you will discover how to apply the best practices when designing a build system to improve developer productivity.

Style and approach

This book is a practical and compact guide that will show you how to use Apache Maven in an optimal way to address enterprise build requirements. It provides technical guidance to get you started with Maven and build automation.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Maven Essentials est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Maven Essentials par Prabath Siriwardena en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatique et DĂ©veloppement de logiciels. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781783986767

Maven Essentials


Table of Contents

Maven Essentials
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Apache Maven Quick Start
Installing Apache Maven
Installing Apache Maven on Ubuntu
Installing Apache Maven on Mac OS X
Installing Apache Maven on Microsoft Windows
Configuring the heap size
Hello Maven!
Convention over configuration
Maven repositories
IDE integration
NetBeans integration
IntelliJ IDEA integration
Eclipse integration
Troubleshooting
Enabling Maven debug level logs
Building a dependency tree
Viewing all the environment variables and system properties
Viewing the effective POM file
Viewing the dependency classpath
Summary
2. Understanding the Project Object Model (POM)
Project Object Model (POM)
POM hierarchy
Super POM
POM extending and overriding
Maven coordinates
The parent POM
Managing POM dependencies
Transitive dependencies
Dependency scopes
Optional dependencies
Dependency exclusion
Summary
3. Maven Archetypes
Archetype quickstart
Batch mode
Archetype catalogues
Building an archetype catalogue
Public archetype catalogues
The anatomy of archetype – catalog.xml
The archetype plugin goals
Java EE web applications with the archetype plugin
Deploying web applications to a remote Apache Tomcat server
Android mobile applications with the archetype plugin
EJB archives with the archetype plugin
JIRA plugins with the archetype plugin
Spring MVC applications with the archetype plugin
Summary
4. Maven Plugins
Common Maven plugins
The clean plugin
The compiler plugin
The install plugin
The deploy plugin
The surefire plugin
The site plugin
The jar plugin
The source plugin
The resources plugin
The release plugin
Plugin discovery and execution
Plugin management
Plugin repositories
Plugin as an extension
Summary
5. Build Lifecycles
Standard lifecycles in Maven
The clean lifecycle
The default lifecycle
The site lifecycle
Lifecycle bindings
Lifecycle extensions
Summary
6. Maven Assemblies
The assembly plugin
The assembly descriptor
Artifact/resource filtering
Assembly help
A runnable standalone Maven project
Summary
7. Best Practices
Dependency management
Defining a parent module
POM properties
Avoiding repetitive groupIds and versions, and inheriting from the parent POM
Following naming conventions
Think twice before you write your own plugin. You may not need it!
The Maven release plugin
The Maven enforcer plugin
Avoiding the use of unversioned plugins
Descriptive parent POM files
Documentation is your friend
Avoid overriding the default directory structure
Using SNAPSHOT versioning during the development
Get rid of unused dependencies
Avoiding keeping credentials in application POM files
Avoiding using deprecated references
Avoiding repetition – use archetypes
Avoiding using maven.test.skip
Summary
Index

Maven Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2015
Production reference: 1251115
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-676-7
www.packtpub.com

Credits

Author
Prabath Siriwardena
Reviewer
Antonio Mendoza PĂ©rez
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Shaon Basu
Content Development Editor
Samantha Gonsalves
Technical Editor
Vivek Pala
Copy Editor
Pranjali Chury
Project Coordinator
Kinjal Bari
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Production Coordinator
Nilesh Mohite
Cover Work
Nilesh Mohite

About the Author

Prabath Siriwardena is the director of Security Architecture at WSO2 Inc., a company that produces a wide variety of open source software from data to screen. He is a member of OASIS Identity Metasystem Interoperability (IMI) TC, OASIS eXtensible Access Control Markup Language (XACML) TC, OASIS Security Services (SAML) TC, OASIS Identity in the Cloud TC, and OASIS Cloud Authorization (CloudAuthZ) TC. Prabath is also a member of PMC Apache Axis and has spoken at numerous international conferences, including OSCON, ApacheCon, WSO2Con, EIC, IDentity Next, and OSDC. He has more than 10 years of industry experience and has worked with many Fortune 100 companies.

Acknowledgments

Table des matiĂšres