Your SlideShare is downloading. ×
0
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
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,553

Published on

Part 1 of an overview of the Maven build system

Part 1 of an overview of the Maven build system

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,553
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
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 <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 3. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>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 <ul><ul><li>Make the build process easy </li></ul></ul><ul><ul><li>Provide a uniform build system </li></ul></ul><ul><ul><li>Provide quality project information </li></ul></ul><ul><ul><li>Provide guidelines for best practices development </li></ul></ul><ul><ul><li>Allow transparent migration to new features </li></ul></ul>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 <ul><ul><li>Ability to reuse existing services </li></ul></ul><ul><ul><ul><li>More than 100 existing Maven plug-ins (jar, cactus, clover, JIRA, site, dashboard, etc) </li></ul></ul></ul><ul><ul><li>Easy to get started </li></ul></ul><ul><ul><ul><li>Just need to configure and extend </li></ul></ul></ul><ul><ul><li>Ability to benefit from new services simply by upgrading </li></ul></ul><ul><ul><li>Well-defined and shared structure/architecture </li></ul></ul>Soaring Eagle L.L.C
  • 8. Advantages (Cont.) <ul><ul><li>Easier to maintain </li></ul></ul><ul><ul><ul><li>Knowledgeable resources on the market </li></ul></ul></ul><ul><ul><ul><li>Well-defined structure </li></ul></ul></ul><ul><ul><li>It makes sense to use a custom approach when flexibility is a must </li></ul></ul><ul><ul><ul><li>This is not usually the case for builds </li></ul></ul></ul>Soaring Eagle L.L.C
  • 9. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 10. Current Versions <ul><ul><li>Maven 1 </li></ul></ul><ul><ul><ul><li>1.0.2 and 1.1-beta-2 </li></ul></ul></ul><ul><ul><ul><li>maven command </li></ul></ul></ul><ul><ul><ul><li>Cut your teeth here and don ’ t worry about the beta label </li></ul></ul></ul><ul><ul><li>Maven 2 </li></ul></ul><ul><ul><ul><li>2.0.1 </li></ul></ul></ul><ul><ul><ul><li>mvn command </li></ul></ul></ul><ul><ul><ul><li>Can run side by side </li></ul></ul></ul>Soaring Eagle L.L.C
  • 11. Maven 101 <ul><ul><li>Maven in 3 concepts: </li></ul></ul><ul><ul><ul><li>POM (Project Object Model) </li></ul></ul></ul><ul><ul><ul><li>Plug-ins </li></ul></ul></ul><ul><ul><ul><ul><li>Made of Goals = Actions </li></ul></ul></ul></ul><ul><ul><ul><li>Repositories </li></ul></ul></ul><ul><ul><li>Maven files (1.0) </li></ul></ul><ul><ul><ul><li>project.xml </li></ul></ul></ul><ul><ul><ul><ul><li>POM (Project Object Model) </li></ul></ul></ul></ul><ul><ul><ul><li>maven.xml </li></ul></ul></ul><ul><ul><ul><ul><li>Custom goals in Jelly </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Goal, pre-Goal, post-Goal </li></ul></ul></ul></ul></ul><ul><ul><ul><li>project.properties </li></ul></ul></ul><ul><ul><ul><ul><li>Runtime Configuration </li></ul></ul></ul></ul><ul><ul><ul><li>build.properties </li></ul></ul></ul><ul><ul><ul><ul><li>Runtime Configuration </li></ul></ul></ul></ul>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) <ul><li>- Site </li></ul><ul><ul><li>Changes </li></ul></ul><ul><ul><li>Jira </li></ul></ul><ul><ul><li>Dashboard </li></ul></ul><ul><ul><li>Changelog </li></ul></ul><ul><ul><li>File activity - Developer activity </li></ul></ul><ul><ul><li>StatCvs </li></ul></ul>- Site - Dist - Artifact - War/Ejb/Ear/Jar... - Scm - Nsis - (Cargo) 4 5 6
  • 17. Maven 2.0 lifecycle (1) <ul><ul><li>validate </li></ul></ul><ul><ul><li>generate-sources </li></ul></ul><ul><ul><li>process-sources </li></ul></ul><ul><ul><li>generate-resources </li></ul></ul><ul><ul><li>process-resources </li></ul></ul><ul><ul><li>compile </li></ul></ul><ul><ul><li>process-classes </li></ul></ul><ul><ul><li>post-process </li></ul></ul>Soaring Eagle L.L.C
  • 18. Maven 2.0 Lifecycle (2) <ul><ul><li>generate-test-sources </li></ul></ul><ul><ul><li>process-test-sources </li></ul></ul><ul><ul><li>generate-test-resources </li></ul></ul><ul><ul><li>process-test-resources </li></ul></ul><ul><ul><li>test-compile </li></ul></ul><ul><ul><li>test </li></ul></ul><ul><ul><li>package </li></ul></ul>Soaring Eagle L.L.C
  • 19. Maven 2.0 lifecycle (3) <ul><ul><li>before-integration-test </li></ul></ul><ul><ul><li>integration-test </li></ul></ul><ul><ul><li>after-integration-test </li></ul></ul><ul><ul><li>verify </li></ul></ul><ul><ul><li>install </li></ul></ul><ul><ul><li>deploy </li></ul></ul>Soaring Eagle L.L.C
  • 20. Value of a repository structure <ul><ul><li>Multiple Levels including environment specific (Dev, QA, Stage, Production) </li></ul></ul><ul><ul><li>Contains Versioned resources </li></ul></ul><ul><ul><li>Can control external library usage </li></ul></ul><ul><ul><li>Logical Organization of artifacts </li></ul></ul><ul><ul><li>Speeds builds using build once philosophy </li></ul></ul><ul><ul><li>Provides audit trail (record of build components) </li></ul></ul><ul><ul><li>Multilevel security </li></ul></ul>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 <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 25. Deployments with Maven <ul><ul><li>It ’ s still an unconsolidated area in (1.0) </li></ul></ul><ul><ul><li>Several plug-ins can be used </li></ul></ul><ul><ul><ul><li>Artifact </li></ul></ul></ul><ul><ul><ul><li>SCM </li></ul></ul></ul><ul><ul><ul><li>Release </li></ul></ul></ul><ul><ul><ul><li>Dist </li></ul></ul></ul><ul><ul><ul><li>Site </li></ul></ul></ul><ul><ul><ul><li>Artifact generation plugins </li></ul></ul></ul><ul><ul><ul><li>Weblogic Plugin </li></ul></ul></ul><ul><ul><li>In the future, to be replaced by Maven-Wagon and Maven-SCM </li></ul></ul>Soaring Eagle L.L.C
  • 26. Release Management <ul><ul><li>Integrates with multiple Source code control systems. </li></ul></ul><ul><ul><li>Integrates with JIRA for release management </li></ul></ul><ul><ul><li>Allows for separation of concerns to support SOX initiatives. </li></ul></ul><ul><ul><li>Provides audit trail </li></ul></ul><ul><ul><li>Easy automation for no touch build and deployment </li></ul></ul><ul><ul><ul><li>Reduces possibility of errors </li></ul></ul></ul>Soaring Eagle L.L.C
  • 27. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 28. Maven integrations <ul><ul><li>IDE </li></ul></ul><ul><ul><ul><li>Mevenide (Eclipse + Net beans + JBuilder) </li></ul></ul></ul><ul><ul><ul><ul><li>Goal launcher </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Search in well known Maven remote repos </li></ul></ul></ul></ul><ul><ul><ul><ul><li>POM editor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>POM validation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>POM/IDE synchronizer </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Jelly editor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Maven builder nature (know which goals should be run when resources change) </li></ul></ul></ul></ul><ul><ul><li>Continuous builds </li></ul></ul><ul><ul><ul><li>Cruise Control, Damage Control, Gump, Continuum </li></ul></ul></ul><ul><ul><li>Future (m2): all Java </li></ul></ul><ul><ul><ul><li>Easier integration </li></ul></ul></ul><ul><ul><ul><li>Talks about a Maven IDE </li></ul></ul></ul>Soaring Eagle L.L.C
  • 29. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>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 <ul><ul><li>Build Coach </li></ul></ul><ul><ul><ul><li>The new type of Quality Manager? </li></ul></ul></ul><ul><ul><ul><li>Overall build responsibility </li></ul></ul></ul><ul><ul><ul><ul><li>Schedule build improvements in project iterations </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Defines quality strategies </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>E.g. Clover: start at 0% and at each iteration increase to level attained. Fail build if below. </li></ul></ul></ul></ul></ul><ul><ul><ul><li>Manages build improvements </li></ul></ul></ul><ul><ul><ul><li>Improve build-awareness </li></ul></ul></ul><ul><ul><ul><ul><li>Every day commit by team </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Run local build before commits </li></ul></ul></ul></ul><ul><ul><ul><li>Gather build requirements from teams </li></ul></ul></ul><ul><ul><ul><ul><li>What checkstyle rules do we want to apply? </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Is the build running fast enough? </li></ul></ul></ul></ul><ul><ul><ul><li>Analyze reasons for build failures </li></ul></ul></ul><ul><ul><li>Build leaders in each team </li></ul></ul><ul><ul><ul><li>Analyze build failures </li></ul></ul></ul><ul><ul><ul><li>Ensure build failure are given top priority and get fixed ASAP </li></ul></ul></ul><ul><ul><ul><li>Coaches team to be build-aware and listen to team </li></ul></ul></ul>Soaring Eagle L.L.C Project Manager Build Coach Team N Build Leader
  • 34. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 35. Maven 1.0 VS 2.0 <ul><ul><li>Maven 1.0 </li></ul></ul><ul><ul><ul><li>project.xml, maven.xml, project.properties </li></ul></ul></ul><ul><ul><ul><li>build.properties </li></ul></ul></ul><ul><ul><ul><li>Open Lifecycle </li></ul></ul></ul><ul><ul><ul><li>Plug-ins in Jelly </li></ul></ul></ul>Soaring Eagle L.L.C Loose project dependencies
  • 36. Maven 1.0 VS 2.0 (Cont) <ul><ul><li>Maven 2.0 </li></ul></ul><ul><ul><ul><li>Defined Inter-Project Dependencies </li></ul></ul></ul><ul><ul><ul><li>Defined project types </li></ul></ul></ul><ul><ul><ul><li>High performance </li></ul></ul></ul><ul><ul><ul><li>Plug-ins in Marmalade, Ant or Java </li></ul></ul></ul>Soaring Eagle L.L.C <ul><ul><li>pom.xml </li></ul></ul><ul><ul><li>settings.xml </li></ul></ul><ul><ul><li>Defined Lifecycle </li></ul></ul><ul><ul><li>Lifecycle based plug-in goals </li></ul></ul><ul><ul><li>Finer grained project configuration </li></ul></ul>
  • 37. Agenda <ul><ul><li>Why Maven? </li></ul></ul><ul><ul><li>Maven 101 </li></ul></ul><ul><ul><li>Deployments with Maven </li></ul></ul><ul><ul><li>Maven integrations </li></ul></ul><ul><ul><li>Maven in the enterprise </li></ul></ul><ul><ul><li>Maven 1.0 versus 2.0 </li></ul></ul><ul><ul><li>Demo </li></ul></ul>Soaring Eagle L.L.C
  • 38. Demo time <ul><ul><li>Create a new project using the archetype plugin </li></ul></ul><ul><ul><li>Create a matching Eclipse project using the eclipse plugin </li></ul></ul><ul><ul><li>Create a jar and run the unit tests (jar/test plug-ins) </li></ul></ul><ul><ul><li>Create the developer ’ s website including reports </li></ul></ul><ul><ul><li>Prepare a release </li></ul></ul><ul><ul><li>Produce a Release </li></ul></ul><ul><ul><li>Continuum </li></ul></ul>Soaring Eagle L.L.C

×