Maven: The Complete Reference

2y ago
31 Views
2 Downloads
2.62 MB
339 Pages
Last View : 14d ago
Last Download : 6m ago
Upload by : Pierre Damon
Transcription

Maven: The Complete ReferenceMaven: The Complete ReferenceEd. 1.0i

Maven: The Complete ReferenceiiContents12Introducing Apache Maven11.1Maven. . . What is it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11.2Convention Over Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21.3A Common Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31.4Universal Reuse through Maven Plugins . . . . . . . . . . . . . . . . . . . . . . . . . .31.5Conceptual Model of a "Project" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41.6Is Maven an alternative to XYZ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51.7Comparing Maven with Ant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6Installing Maven102.1Verify your Java Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102.2Downloading Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112.3Installing Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

Maven: The Complete Reference3iii2.3.1Installing Maven on Linux, BSD or Mac OSX . . . . . . . . . . . . . . . . . . .122.3.2Installing Maven on Microsoft Windows . . . . . . . . . . . . . . . . . . . . . .122.4Testing a Maven Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132.5Maven Installation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132.5.1User-specific Configuration and Repository . . . . . . . . . . . . . . . . . . . .142.5.2Upgrading a Maven Installation . . . . . . . . . . . . . . . . . . . . . . . . . .152.6Uninstalling Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152.7Getting Help with Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152.8About the Apache Software License . . . . . . . . . . . . . . . . . . . . . . . . . . . .16The Project Object Model183.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183.2The POM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183.2.1The Super POM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213.2.2The Simplest POM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253.2.3The Effective POM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263.2.4Real POMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26POM Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263.3.1273.3Project Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Maven: The Complete Reference3.3.1.1Version Build Numbers . . . . . . . . . . . . . . . . . . . . . . . . .273.3.1.2SNAPSHOT Versions . . . . . . . . . . . . . . . . . . . . . . . . . .28Property References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28Project Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303.4.1Dependency Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313.4.2Optional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323.4.3Dependency Version Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . .343.4.4Transitive Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353.4.4.1Transitive Dependencies and Scope . . . . . . . . . . . . . . . . . . .35Conflict Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36Project Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403.5.1More on Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403.5.2Project Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42POM Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443.6.1Grouping Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453.6.2Multi-module vs. Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . .473.6.2.1Simple Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473.6.2.2Multi-module Enterprise Project . . . . . . . . . . . . . . . . . . . .493.3.23.43.4.53.53.6iv

Maven: The Complete Reference4vThe Build Lifecycle524.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524.1.1Clean Lifecycle (clean) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .534.1.2Default Lifecycle (default) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .564.1.3Site Lifecycle (site) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57Package-specific Lifecycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .584.2.1JAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .594.2.2POM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .594.2.3Maven Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604.2.4EJB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604.2.5WAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .614.2.6EAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .614.2.7Other Packaging Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62Common Lifecycle Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634.3.1Process Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634.3.2Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674.3.3Process Test Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684.3.4Test Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684.24.3

Maven: The Complete Reference5vi4.3.5Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .694.3.6Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .704.3.7Deploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70Build Profiles715.1What Are They For? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .715.1.1What is Build Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .715.1.1.1Non-Portable Builds . . . . . . . . . . . . . . . . . . . . . . . . . . .725.1.1.2Environment Portability . . . . . . . . . . . . . . . . . . . . . . . . .725.1.1.3Organizational (In-House) Portability . . . . . . . . . . . . . . . . . .725.1.1.4Wide (Universal) Portability . . . . . . . . . . . . . . . . . . . . . . .73Selecting an Appropriate Level of Portability . . . . . . . . . . . . . . . . . . .73Portability through Maven Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . .745.2.1Overriding a Project Object Model . . . . . . . . . . . . . . . . . . . . . . . . .76Profile Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .775.3.1Activation Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .795.3.2Activation by the Absence of a Property . . . . . . . . . . . . . . . . . . . . . .805.4Listing Active Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .815.5Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .815.1.25.25.3

Maven: The Complete Reference5.66vii5.5.1Common Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .825.5.2Protecting Secrets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .845.5.3Platform Classifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87Running Maven886.1Maven Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .886.1.1Defining Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .886.1.2Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .896.1.3Using Build Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .906.1.4Displaying Version Information . . . . . . . . . . . . . . . . . . . . . . . . . .906.1.5Running in Offline Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .916.1.6Using a Custom POM or Custom Settings File . . . . . . . . . . . . . . . . . .916.1.7Encrypting Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .916.1.8Dealing with Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .926.1.9Controlling Maven’s Verbosity . . . . . . . . . . . . . . . . . . . . . . . . . . .926.1.10 Running Maven in Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . .936.1.11 Downloading and Verifying Dependencies . . . . . . . . . . . . . . . . . . . . .936.1.12 Non-recursive Builds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94

Maven: The Complete Reference6.26.3Using Advanced Reactor Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .946.2.1Advanced Reactor Options Example Project . . . . . . . . . . . . . . . . . . . .956.2.2Resuming Builds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .976.2.3Specifying a Subset of Projects . . . . . . . . . . . . . . . . . . . . . . . . . . .976.2.4Making a Subset of Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . .986.2.5Making Project Dependents . . . . . . . . . . . . . . . . . . . . . . . . . . . .986.2.6Resuming a "make" build . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99Using the Maven Help Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .996.3.178Describing a Maven Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Maven Configuration7.1viii103Configuring Maven Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1037.1.1Plugin Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 1037.1.2Adding Plugin Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077.1.3Setting Global Plugin Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 1087.1.4Setting Execution Specific Parameters . . . . . . . . . . . . . . . . . . . . . . . 1087.1.5Setting Default Command Line Execution Parameters . . . . . . . . . . . . . . 1097.1.6Setting Parameters for Goals Bound to Default Lifecycle . . . . . . . . . . . . . 110Maven Assemblies112

Maven: The Complete Referenceix8.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1128.2Assembly Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1138.2.1Predefined Assembly Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . 1148.2.2Building an Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1148.2.3Assemblies as Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1178.2.4Assembling Assemblies via Assembly Dependencies . . . . . . . . . . . . . . . 1188.3Overview of the Assembly Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . 1228.4The Assembly Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1238.58.4.1Property References in Assembly Descriptors . . . . . . . . . . . . . . . . . . . 1238.4.2Required Assembly Information . . . . . . . . . . . . . . . . . . . . . . . . . . 123Controlling the Contents of an Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . 1258.5.1Files Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1258.5.2FileSets Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268.5.3Default Exclusion Patterns for . . . . . . . . . . . . . . . . . . . . . . . . . . . 1288.5.4dependencySets Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1298.5.4.1Customizing Dependency Output Location . . . . . . . . . . . . . . . 1318.5.4.2Interpolation of Properties in Dependency Output . . . . . . . . . . . 1328.5.4.3Including and Excluding Dependencies by Scope . . . . . . . . . . . 133

Maven: The Complete Reference8.5.58.68.79x8.5.4.4Fine Tuning: Dependency Includes and Excludes . . . . . . . . . . . 1358.5.4.5Transitive Dependencies, Project Attachments, and Project . . . . . . 1378.5.4.6Advanced Unpacking Options . . . . . . . . . . . . . . . . . . . . . . 1388.5.4.7Summarizing Dependency Sets . . . . . . . . . . . . . . . . . . . . . 140moduleSets Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1408.5.5.1Module Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1418.5.5.2Sources Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1418.5.5.3Interpolation of outputDirectoryMapping in . . . . . . . . . . 1438.5.5.4Binaries section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1448.5.5.5moduleSets, Parent POMs . . . . . . . . . . . . . . . . . . . . . . 1468.5.6Repositories Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1468.5.7Managing the Assembly’s Root Directory . . . . . . . . . . . . . . . . . . . . . 1478.5.8componentDescriptors and . . . . . . . . . . . . . . . . . . . . . . . . . 148Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1498.6.1Standard, Reusable Assembly Descriptors . . . . . . . . . . . . . . . . . . . . . 1498.6.2Distribution (Aggregating) Assemblies . . . . . . . . . . . . . . . . . . . . . . 152Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Properties and Resource Filtering158

Maven: The Complete Referencexi9.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1589.2Maven Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1599.39.2.1Maven Project Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1599.2.2Maven Settings Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1619.2.3Environment Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 1629.2.4Java System Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1629.2.5User-defined Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163Resource Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16410 Site Generation16810.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16810.2 Building a Project Site with Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16910.3 Customizing the Site Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17110.3.1 Customizing the Header Graphics . . . . . . . . . . . . . . . . . . . . . . . . . 17310.3.2 Customizing the Navigation Menu . . . . . . . . . . . . . . . . . . . . . . . . . 17310.4 Site Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17510.5 Writing Project Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17610.5.1 APT Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17610.5.2 FML Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Maven: The Complete Referencexii10.6 Deploying Your Project Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17810.6.1 Configuring Server Authentication . . . . . . . . . . . . . . . . . . . . . . . . . 17910.6.2 Configuring File and Directory Modes . . . . . . . . . . . . . . . . . . . . . . . 17910.7 Customizing Site Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010.7.1 Customizing the Site CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010.7.2 Create a Custom Site Template . . . . . . . . . . . . . . . . . . . . . . . . . . . 18110.7.3 Reusable Website Skins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18610.7.4 Creating a Custom Theme CSS . . . . . . . . . . . . . . . . . . . . . . . . . . 18710.8 Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18910.8.1 Inject XHTML into HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18910.8.2 Add Links under Your Site Logo . . . . . . . . . . . . . . . . . . . . . . . . . . 19010.8.3 Add Breadcrumbs to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . 19010.8.4 Add the Project Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19110.8.5 Modify the Publication Date Format and Location . . . . . . . . . . . . . . . . 19210.8.6 Using Doxia Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19311 Writing Plugins19511.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19511.2 Programming Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Maven: The Complete Referencexiii11.2.1 What is Inversion of Control? . . . . . . . . . . . . . . . . . . . . . . . . . . . 19611.2.2 Introduction to Plexus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19711.2.3 Why Plexus? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19811.2.4 What is a Plugin? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19811.3 Plugin Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19911.3.1 Top-level Plugin Descriptor Elements . . . . . . . . . . . . . . . . . . . . . . . 20111.3.2 Mojo Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20211.3.3 Plugin Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20411.4 Writing a Custom Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20411.4.1 Creating a Plugin Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20511.4.2 A Simple Java Mojo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20611.4.3 Configuring a Plugin Prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20811.4.4 Logging from a Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21111.4.5 Mojo Class Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21111.4.6 When a Mojo Fails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21311.5 Mojo Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21411.5.1 Supplying Values for Mojo Parameters . . . . . . . . . . . . . . . . . . . . . . 21411.5.2 Multi-valued Mojo Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

Maven: The Complete Referencexiv11.5.3 Depending on Plexus Components . . . . . . . . . . . . . . . . . . . . . . . . . 21811.5.4 Mojo Parameter Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21911.6 Plugins and the Maven Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22011.6.1 Executing a Parallel Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . 22011.6.2 Creating a Custom Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22111.6.3 Overriding the Default Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . 22312 Using Maven Archetypes22512.1 Introduction to Maven Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22512.2 Using Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22512.2.1 Using an Archetype from the Command Line . . . . . . . . . . . . . . . . . . . 22612.2.2 Using the Interactive generate Goal . . . . . . . . . . . . . . . . . . . . . . . . 22712.2.3 Using an Archetype from m2eclipse . . . . . . . . . . . . . . . . . . . . . . . . 22912.3 Available Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22912.3.1 Common Maven Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23012.3.1.1 maven-archetype-quickstart . . . . . . . . . . . . . . . . . . . . . . . 23012.3.1.2 maven-archetype-webapp . . . . . . . . . . . . . . . . . . . . . . . . 23012.3.1.3 maven-archetype-mojo . . . . . . . . . . . . . . . . . . . . . . . . . 23012.3.2 Notable Third-Party Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Maven: The Complete Referencexv12.3.2.1 AppFuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23112.3.2.2 Confluence and JIRA plugins . . . . . . . . . . . . . . . . . . . . . . 23212.3.2.3 Wicket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23312.4 Publishing Archetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23413 Developing with Flexmojos23713.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23713.2 Configuring Build Environment for Flexmojos . . . . . . . . . . . . . . . . . . . . . . . 23713.2.1 Referencing a Repository with the Flex Framework . . . . . . . . . . . . . . . . 23813.2.1.1 Referencing Sonatype’s Flexmojos Repository in a POM . . . . . . . 23813.2.1.2 Proxying Sonatype’s Flexmojos Repository with Nexus . . . . . . . . 23913.2.2 Configure a Flexmojos Proxy Repository in Nexus . . . . . . . . . . . . . . . . 23913.2.2.1 Add the Flexmojos Proxy Repository to a Group . . . . . . . . . . . . 24213.2.2.2 Configure Your Development Environment for Nexus . . . . . . . . . 24413.2.3 Configuring Environment to Support Flex Unit Tests . . . . . . . . . . . . . . . 24513.2.4 Adding FlexMojos to Your Maven Settings’ Plugin Groups . . . . . . . . . . . . 24613.3 Creating a Flex Mojos Project from an Archetype . . . . . . . . . . . . . . . . . . . . . 24713.3.1 Creating a Flex Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24713.3.2 Creating a Flex Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

Maven: The Complete Referencexvi13.3.3 Creating a Multi-module Project: Web Application with a Flex . . . . . . . . . . 25813.4 The FlexMojos Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26713.4.1 The SWC Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26813.4.2 The SWF Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26913.5 FlexMojos Plugin Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27113.5.1 Generating Actionscript Documentation . . . . . . . . . . . . . . . . . . . . . . 27213.5.2 Compiling Flex Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27213.5.3 Generating Flex Builder Project Files . . . . . . . . . . . . . . . . . . . . . . . 27313.6 FlexMojos Plugin Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27413.6.1 Generating Actionscript Documentation Report . . . . . . . . . . . . . . . . . . 27413.7 Developing and Customizing Flexmojos . . . . . . . . . . . . . . . . . . . . . . . . . . 27613.7.1 Get the Flexmojos Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . 27614 Android Application Development with Maven27814.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27814.2 Configuring Build Environment for Android Development . . . . . . . . . . . . . . . . 27914.2.1 Installing the Android SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27914.2.2 Android artifact install into Maven repository . . . . . . . . . . . . . . . . . . . 28014.2.2.1 Installation to local repository . . . . . . . . . . . . . . . . . . . . . . 280

Maven: The Complete Referencexvii14.2.2.2 Installation to remote repository . . . . . . . . . . . . . . . . . . . . . 28114.2.2.3 Installation of a subset of all platforms . . . . . . . . . . . . . . . . . 28114.3 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28214.4 Creating New Projects with the Android Maven Archetypes . . . . . . . . . . . . . . . . 28414.5 Using Add-Ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28514.6 Multi Module Android Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28614.7 Using external dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28614.8 The Custom Lifecycle from the Android Maven Plugin . . . . . . . . . . . . . . . . . . 28714.9 Plugin Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28814.10Device Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28914.11Emulator Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29014.12Other Useful Android Maven Plugin Goals . . . . . . . . . . . . . . . . . . . . . . . . 29114.12.1 Manifest-update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29114.12.2 Zipalign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29114.12.3 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29114.13Internal Android Maven Plugin Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . 29114.14Testing Android Application Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29214.14.1 Unit tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

Maven: The Complete Referencexviii14.14.2 Instrumentation tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29314.15Native Application Builds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29414.16Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29414.16.1 Other Maven Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29414.16.2 Performing a Release Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29514.16.3 Configuring command line usage . . . . . . . . . . . . . . . . . . . . . . . . . 29515 Appendix: Settings Details29615.1 Quick Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29615.2 Settings Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29715.2.1 Simple Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29715.2.2 Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29815.2.3 Mirrors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29915.2.4 Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30015.2.5 Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30115.2.6 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30115.2.7 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30315.2.8 Repositories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30415.2.9 Plugin Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

Maven: The Complete Referencexix15.2.10 Active Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30615.2.11 Encrypting Passwords in Maven Settings . . . . . . . . . . . . . . . . . . . . . 30716 Appendix: Sun Specification Alternatives31217 Creative Commons License315

Maven: The Complete ReferencexxPrefaceMaven is a build tool, a project management tool, an abstract container for running build tasks. It is atool that has shown itself indispensable for projects that graduate beyond the simple and need to startfinding consistent ways to manage and build large collections of interdependent modules and librarieswhich make use of tens or hundreds of third-party components. It is a tool that has removed much of theburden of 3rd party dependency management from the daily work schedule of millions of engineers, andit has enabled many organizations to evolve beyond the toil and struggle of build management into a newphase where the effort required to build and maintain software is no longer a limiting factor in softwaredesign.This work is the first attempt at a comprehensive title on Maven. It builds upon the combined experienceand work of the authors of all previous Maven titles, and you should view it not as a finished work butas the first edition in a long line of updates to follow. While Maven has been around for a few years,the authors of this book believe that it has just begun to deliver on the audacious promises it makes. Theauthors, and company behind this book, Sonatype, believe that the publishing of this book marks thebeginning of a new phase of innovation and development surrounding Maven and the software ecosystemthat surrounds it.AcknowledgementsSonatype would like to thank the following contributors. The people listed below have provided feedbackwhich has helped improve the quality of this book. Thanks to Raymond Toal, Steve Daly, Paul Strack, PaulReinerfelt, Chad Gorshing, Marcus Biel, Brian Dols, Mangalaganesh Balasubramanian, Marius Kruger,and Mark Stewart. Special thanks to Joel Costigliola for helping to debug and correct the Spring webchapter. Stan Guillory was practically a contributing author given the number of corrections he posted tothe book’s Get Satisfaction. Thank you Stan. Special thanks to Richard Coasby of Bamboo for acting asthe provisional grammar consultant.

Maven: The Complete ReferencexxiThanks to our contributing authors including Eric Redmond.Thanks to the following contributors who rep

Maven: The Complete Reference iii 2.3.1 Installing Maven on Linux, BSD or Mac OSX. . . . . . . . . . . . . . . . . . .12 2.3.2 Installing Maven on Microsoft Windows .File Size: 2MBPage Count: 339

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

Tutorial based on Maven training material Courtesy by Sonatype. Maven @ Jfokus 2010 Next Generation Development Infrastructure: Maven, M2Eclipse, Nexus & Hudson by Jason van Zyl 14.15-15.00, Jan 27 Also come visit Sonatype’s booth! Advanced Maven Techniques Maven in your IDE

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

Hands-on Maven 2 -- working with multiple project builds Installing the Maven 2.x Plug-in for Eclipse 3.2 Working with the Maven 2.x Plug-in for Eclipse 3.2 As you complete this tutorial, you will gain an appreciation and understanding of the philosophy behind the design of Maven

Yaml / groovy G r a d l e 2007. Authors, Company, Community Jason Van Zyl Worked on Turbine Author of - Velocity - Maven founder of Sonatype . Logo comes from maven (maven-site-plugin ) Then you recognise pom infos. Basic Declarations. Maven Core Concepts 2 : D