万本电子书0元读

万本电子书0元读

顶部广告

Mastering Apache Maven 3电子书

售       价:¥

10人正在读 | 0人评论 6.2

作       者:Prabath Siriwardena

出  版  社:Packt Publishing

出版时间:2014-12-29

字       数:116.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
If you are working with Java or Java EE projects and you want to take full advantage of Maven in designing, executing, and maintaining your build system for optimal developer productivity, then this book is ideal for you. You should be well versed with Maven and its basic functionality if you wish to get the most out of the book.
目录展开

Mastering Apache Maven 3

Table of Contents

Mastering Apache Maven 3

Credits

About the Author

Acknowledgments

About the Reviewers

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

A quick introduction

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

Monitoring the build

Remote debugging

Convention over configuration

IDE integration

NetBeans integration

IntelliJ IDEA integration

Eclipse integration

Troubleshooting

Enabling Maven debug-level logs

Building dependency tree

Viewing all environment variables and system properties

Viewing the effective POM file

Viewing the dependency classpath

Summary

2. Demystifying Project Object Model

Project Object Model

The POM hierarchy

Super POM

POM extending and overriding

Maven coordinates

Parent POM file

Managing POM dependencies

Transitive dependencies

Dependency scopes

Optional dependencies

Dependency exclusion

Summary

3. Maven Configuration

Maven Wagon

Wagon HTTP(S) transport

Wagon system properties

Proxy authentication

Secured repositories

Encrypting credentials in settings.xml

Source Control Management systems

Maven with Subversion

Local repository location

Mirrored repositories

The internal corporate repository

Advanced mirror configurations

Deploying artifacts

Deploying file-based artifacts

Deploying SSH-based artifacts

Deploying FTP-based artifacts

Enabling Maven logging

Summary

4. Build Lifecycles

Standard lifecycles in Maven

The clean lifecycle

The default lifecycle

The site lifecycle

Lifecycle bindings

Building a custom lifecycle

Lifecycle extensions

Summary

5. 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

Plexus

Maven and Dependency Injection

Google Guice

Developing custom plugins

Associating a plugin with a lifecycle

The plugin execution order

Inside the execute method

Summary

6. Maven Assemblies

The assembly plugin

The assembly descriptor

Artifact/resource filtering


Assembly help

A runnable, standalone Maven project

Summary

7. Maven Archetypes

Archetype quickstart

The batch mode

Archetype catalogues

Building an archetype catalogue

Public archetype catalogues

The anatomy of archetype-catalog.xml

The archetype plugin goals

Maven plugins with the archetype plugin

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

Building a custom archetype

The archetype descriptor

Generating a multimodule Maven project

archetype:create-from-project with custom properties

Summary

8. Maven Repository Management

Maven repositories

The update policy

Multiple repositories

Repositories in settings.xml

The Maven repository manager

Repository management with Nexus

Installing and running Nexus

Creating a hosted repository

Creating a proxy repository

Creating a virtual repository

Blocking selected artifacts

Inclusive and exclusive routing

Scheduled tasks

Artifact indexing

Nexus plugins

A repository metadata model

Summary

9. Best Practices

Dependency management

Defining a parent module

POM properties

Avoiding repetitive groupId and version tags and inherit from the parent POM

Following naming conventions

Maven profiles

Think twice before you write your own plugin

The Maven release plugin

The Maven enforcer plugin

Avoid using un-versioned plugins

Using exclusive and inclusive routes

Avoid having both release and snapshot repositories in the same group repository

Avoid having both proxy and hosted repositories in the same group repository

Minimizing the number of repositories

Using mirrorOf instead of changing repository URLs

Descriptive parent POM files

Documentation is your friend

Avoid overriding the default directory structure

Using SNAPSHOT versioning during development

Get rid of unused dependencies

Avoid keeping credentials in application POM files

Avoid using deprecated references

Avoid repetition – use archetypes

Avoid using maven.test.skip

Share resources – avoid duplicates

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部