Mobil technolgia - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Mobil technolgia

Description:

Providing guidelines for best practices development ... name Maven Quick Start Archetype /name url http://maven.apache.org /url dependencies ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 16
Provided by: Mar5672
Category:

less

Transcript and Presenter's Notes

Title: Mobil technolgia


1
Maven Build and project management in the 21th
century
2
The evolution of build systems
3
Mavens 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
  • ltproject xmlns"http//maven.apache.org/POM/4.0.0"
  • xmlnsxsi"http//www.w3.org/2001/XMLSchema-inst
    ance"
  • xsischemaLocation"http//maven.apache.org/POM/
    4.0.0
  • http//maven.apache.org/xsd/
    maven-4.0.0.xsd"gt
  • ltmodelVersiongt4.0.0lt/modelVersiongt
  • ltgroupIdgtcom.mycompany.applt/groupIdgt
  • ltartifactIdgtmy-applt/artifactIdgt
  • ltpackaginggtjarlt/packaginggt
  • ltversiongt1.0-SNAPSHOTlt/versiongt
  • ltnamegtMaven Quick Start Archetypelt/namegt
  • lturlgthttp//maven.apache.orglt/urlgt
  • ltdependenciesgt
  • ltdependencygt
  • ltgroupIdgtjunitlt/groupIdgt
  • ltartifactIdgtjunitlt/artifactIdgt
  • ltversiongt3.8.1lt/versiongt
  • ltscopegttestlt/scopegt
  • lt/dependencygt
  • lt/dependenciesgt

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
Write a Comment
User Comments (0)
About PowerShow.com