Presentation is loading. Please wait.

Presentation is loading. Please wait.

Maven: Build and project management in the 21th century.

Similar presentations

Presentation on theme: "Maven: Build and project management in the 21th century."— Presentation transcript:

1 Maven: Build and project management in the 21th century

2 The evolution of build systems

3 Maven’s objectives Making the build process easy Providing a uniform build system Providing quality project information Providing guidelines for best practices development Allowing transparent migration to new features

4 Providing a uniform build system POM Maven plugins Learn once, build anything Every Ant script is different. Why? Maven uses convention over configuration Maven conventions make it easier to learn a new project

5 Providing quality project information Based on the POM, partly generated from the source Change log document created directly from source control Cross referenced sources Mailing lists Dependency list Unit test reports including coverage

6 Providing guidelines for best practices development Standard directory layout Specification, execution, and reporting of unit tests Keeping your test source code in a separate, but parallel source tree Using test case naming conventions to locate and execute tests Have test cases setup their environment and don't rely on customizing the build for test preparation.

7 Maven aspects - summary Builds Documentation Reporting Dependencies SCMs Releases Distribution

8 Build lifecycle Ant: define your own build lifecycle Maven: each project corresponds to a single binary artifact Standard build lifecycle for each type of project - jar, war, ear, etc. Work performed by Maven ‘plugins’, wired to different phases of the build lifecycle. The default wiring is sufficient for most projects. Minimal configuration

9 Introduction to the POM <project xmlns="" xmlns:xsi="" xsi:schemaLocation=""> 4.0.0 my-app jar 1.0-SNAPSHOT Maven Quick Start Archetype junit 3.8.1 test

10 POM elements Each module has a POM Packaging type (jar, war, pom etc.) Group (namespace of the artifact) Name Version Dependencies Build information, plugins, build profiles Reporting information

11 Dependency management Declarative dependency management Artifact repository A set of folders: versioned artifacts and POMs Directory structure: group, name, version Artifact resolution: local (.m2), internal proxy (Nexus), Maven Central (like DNS) Transitive dependencies

12 Release management Release plugin –Check for uncommitted changes –Tag the SCM Assembly plugin –Create the application binaries –Assist the transition stage

13 Development tools SCM: SVN Continuous integration: Hudson Repository management: Nexus Issue tracking: Trac Build: Maven IDE: Eclipse

14 An example: the InPhorms POM Modules Dependency management Distribution management SCM Reporting Build Profiles

15 Questions and answers

Download ppt "Maven: Build and project management in the 21th century."

Similar presentations

Ads by Google