Maven Overview Part I Denver Java User's Group and Denver BEA User's Group Jan 2006
Upcoming SlideShare
Loading in...5
×
 

Maven Overview Part I Denver Java User's Group and Denver BEA User's Group Jan 2006

on

  • 1,580 views

Part 1 of an overview of the Maven build system

Part 1 of an overview of the Maven build system

Statistics

Views

Total Views
1,580
Views on SlideShare
1,580
Embed Views
0

Actions

Likes
1
Downloads
35
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Maven Overview Part I Denver Java User's Group and Denver BEA User's Group Jan 2006 Maven Overview Part I Denver Java User's Group and Denver BEA User's Group Jan 2006 Presentation Transcript

  • Maven Overview Part 1 Denver JBOSS User ’ s Group January 2006 Scott Ryan Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Analogy: How to develop an application? Soaring Eagle L.L.C My Application Frameworks Solution 1 My Application Solution 2 Container E.g. Application Server, Eclipse RCP, Net beans, etc API Services
  • Maven Objectives
      • Make the build process easy
      • Provide a uniform build system
      • Provide quality project information
      • Provide guidelines for best practices development
      • Allow transparent migration to new features
    Soaring Eagle L.L.C
  • How to develop a build? Soaring Eagle L.L.C My Build Ant tasks Solution 1: Ant My Build Solution 2: Maven Maven (Container) Task calls Goals/Plug-ins «  Maven is a build container  »
  • Advantages of a Container Approach
      • Ability to reuse existing services
        • More than 100 existing Maven plug-ins (jar, cactus, clover, JIRA, site, dashboard, etc)
      • Easy to get started
        • Just need to configure and extend
      • Ability to benefit from new services simply by upgrading
      • Well-defined and shared structure/architecture
    Soaring Eagle L.L.C
  • Advantages (Cont.)
      • Easier to maintain
        • Knowledgeable resources on the market
        • Well-defined structure
      • It makes sense to use a custom approach when flexibility is a must
        • This is not usually the case for builds
    Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Current Versions
      • Maven 1
        • 1.0.2 and 1.1-beta-2
        • maven command
        • Cut your teeth here and don ’ t worry about the beta label
      • Maven 2
        • 2.0.1
        • mvn command
        • Can run side by side
    Soaring Eagle L.L.C
  • Maven 101
      • Maven in 3 concepts:
        • POM (Project Object Model)
        • Plug-ins
          • Made of Goals = Actions
        • Repositories
      • Maven files (1.0)
        • project.xml
          • POM (Project Object Model)
        • maven.xml
          • Custom goals in Jelly
            • Goal, pre-Goal, post-Goal
        • project.properties
          • Runtime Configuration
        • build.properties
          • Runtime Configuration
    Soaring Eagle L.L.C
  • Maven (2.0) Project Layout Soaring Eagle L.L.C
  • POM (1.0) example (1/2) Soaring Eagle L.L.C
  • POM (1.0) example (2/2) Soaring Eagle L.L.C
  • Project lifecycle with Maven (1.0) plug-ins (1/2) Soaring Eagle L.L.C Prepare Project Compile/Archive Unit tests Quality checks - Genapp - JBuilder - Idea - JDeveloper - Eclipse - Scm - Java - Jar - War - Ejb - Ear - Rar - Uberjar - XDoclet - Test - AspectJ - Checkstyle - PMD - Findbugs - Clover - Emma - JCoverage - JDepend - Ncss - Patterntesting 1 2 3
  • Project lifecycle with Maven(1.0) plug-ins (2/2) Soaring Eagle L.L.C Environment Deployment Functional tests Site/Report Generation Deployment - JBoss - WebSphere - WebLogic - Jetty - Cactus - Latka - HttpUnit - Abbot - (Cargo)
    • - Site
      • Changes
      • Jira
      • Dashboard
      • Changelog
      • File activity - Developer activity
      • StatCvs
    - Site - Dist - Artifact - War/Ejb/Ear/Jar... - Scm - Nsis - (Cargo) 4 5 6
  • Maven 2.0 lifecycle (1)
      • validate
      • generate-sources
      • process-sources
      • generate-resources
      • process-resources
      • compile
      • process-classes
      • post-process
    Soaring Eagle L.L.C
  • Maven 2.0 Lifecycle (2)
      • generate-test-sources
      • process-test-sources
      • generate-test-resources
      • process-test-resources
      • test-compile
      • test
      • package
    Soaring Eagle L.L.C
  • Maven 2.0 lifecycle (3)
      • before-integration-test
      • integration-test
      • after-integration-test
      • verify
      • install
      • deploy
    Soaring Eagle L.L.C
  • Value of a repository structure
      • Multiple Levels including environment specific (Dev, QA, Stage, Production)
      • Contains Versioned resources
      • Can control external library usage
      • Logical Organization of artifacts
      • Speeds builds using build once philosophy
      • Provides audit trail (record of build components)
      • Multilevel security
    Soaring Eagle L.L.C
  • Maven Repositories Soaring Eagle L.L.C Maven core Remote Repository Web Server Local Repository project.xml (POM) 1 2 3 4 JVM 1 JVM 2 HTTP Get dependencies Checks if artifact exists in local repository. Download artifact Save artifact in local repository
  • Maven 1.0 Repository Soaring Eagle L.L.C
  • Maven 2.0 Repository Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Deployments with Maven
      • It ’ s still an unconsolidated area in (1.0)
      • Several plug-ins can be used
        • Artifact
        • SCM
        • Release
        • Dist
        • Site
        • Artifact generation plugins
        • Weblogic Plugin
      • In the future, to be replaced by Maven-Wagon and Maven-SCM
    Soaring Eagle L.L.C
  • Release Management
      • Integrates with multiple Source code control systems.
      • Integrates with JIRA for release management
      • Allows for separation of concerns to support SOX initiatives.
      • Provides audit trail
      • Easy automation for no touch build and deployment
        • Reduces possibility of errors
    Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Maven integrations
      • IDE
        • Mevenide (Eclipse + Net beans + JBuilder)
          • Goal launcher
          • Search in well known Maven remote repos
          • POM editor
          • POM validation
          • POM/IDE synchronizer
          • Jelly editor
          • Maven builder nature (know which goals should be run when resources change)
      • Continuous builds
        • Cruise Control, Damage Control, Gump, Continuum
      • Future (m2): all Java
        • Easier integration
        • Talks about a Maven IDE
    Soaring Eagle L.L.C
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Continuous build Soaring Eagle L.L.C Remote Repository Maven Continuous Build Local Repository Synchronization A B C Project C Build get dependent artifacts from A and B
  • Multi-location Set-up Soaring Eagle L.L.C Src Repository (CVS) Continuous Build Maven Remote Repository Maven Remote Repository Internet connection / leased line commits commits Synchronization (rsync) Country 1 Country 2
  • Maven repositories Soaring Eagle L.L.C Project A Remote Repository Enterprise Remote Repository Snapshots Stable versions Project B Remote Repository Snapshots
  • Team organization
      • Build Coach
        • The new type of Quality Manager?
        • Overall build responsibility
          • Schedule build improvements in project iterations
          • Defines quality strategies
            • E.g. Clover: start at 0% and at each iteration increase to level attained. Fail build if below.
        • Manages build improvements
        • Improve build-awareness
          • Every day commit by team
          • Run local build before commits
        • Gather build requirements from teams
          • What checkstyle rules do we want to apply?
          • Is the build running fast enough?
        • Analyze reasons for build failures
      • Build leaders in each team
        • Analyze build failures
        • Ensure build failure are given top priority and get fixed ASAP
        • Coaches team to be build-aware and listen to team
    Soaring Eagle L.L.C Project Manager Build Coach Team N Build Leader
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Maven 1.0 VS 2.0
      • Maven 1.0
        • project.xml, maven.xml, project.properties
        • build.properties
        • Open Lifecycle
        • Plug-ins in Jelly
    Soaring Eagle L.L.C Loose project dependencies
  • Maven 1.0 VS 2.0 (Cont)
      • Maven 2.0
        • Defined Inter-Project Dependencies
        • Defined project types
        • High performance
        • Plug-ins in Marmalade, Ant or Java
    Soaring Eagle L.L.C
      • pom.xml
      • settings.xml
      • Defined Lifecycle
      • Lifecycle based plug-in goals
      • Finer grained project configuration
  • Agenda
      • Why Maven?
      • Maven 101
      • Deployments with Maven
      • Maven integrations
      • Maven in the enterprise
      • Maven 1.0 versus 2.0
      • Demo
    Soaring Eagle L.L.C
  • Demo time
      • Create a new project using the archetype plugin
      • Create a matching Eclipse project using the eclipse plugin
      • Create a jar and run the unit tests (jar/test plug-ins)
      • Create the developer ’ s website including reports
      • Prepare a release
      • Produce a Release
      • Continuum
    Soaring Eagle L.L.C