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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

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

  • 1,516 views
Published

Part 1 of an overview of the Maven build system

Part 1 of an overview of the Maven build system

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,516
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
36
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Maven Overview Part 1 Denver JBOSS User ’ s Group January 2006 Scott Ryan Soaring Eagle L.L.C
  • 2. 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
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. 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  »
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. 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
  • 11. 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
  • 12. Maven (2.0) Project Layout Soaring Eagle L.L.C
  • 13. POM (1.0) example (1/2) Soaring Eagle L.L.C
  • 14. POM (1.0) example (2/2) Soaring Eagle L.L.C
  • 15. 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
  • 16. 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
  • 17. Maven 2.0 lifecycle (1)
      • validate
      • generate-sources
      • process-sources
      • generate-resources
      • process-resources
      • compile
      • process-classes
      • post-process
    Soaring Eagle L.L.C
  • 18. 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
  • 19. Maven 2.0 lifecycle (3)
      • before-integration-test
      • integration-test
      • after-integration-test
      • verify
      • install
      • deploy
    Soaring Eagle L.L.C
  • 20. 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
  • 21. 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
  • 22. Maven 1.0 Repository Soaring Eagle L.L.C
  • 23. Maven 2.0 Repository Soaring Eagle L.L.C
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. 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
  • 29. 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
  • 30. 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
  • 31. 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
  • 32. Maven repositories Soaring Eagle L.L.C Project A Remote Repository Enterprise Remote Repository Snapshots Stable versions Project B Remote Repository Snapshots
  • 33. 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
  • 34. 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
  • 35. 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
  • 36. 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
  • 37. 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
  • 38. 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