Maven Overview Part 2 Denver BEA User's Group and Denver Java User's Group January 2006

638 views

Published on

Part 2 of an overview of the Maven build system

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
638
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Maven Overview Part 2 Denver BEA User's Group and Denver Java User's Group January 2006

  1. 1. Maven Overview Part II Denver BEA User ’ s Group January 2006 Scott Ryan Soaring Eagle L.L.C
  2. 2. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Pom configuration </li></ul></ul>Soaring Eagle L.L.C
  3. 3. Maven 2.0 lifecycle Summary <ul><ul><li>20 total phases </li></ul></ul><ul><ul><ul><li>validate </li></ul></ul></ul><ul><ul><ul><li>compile </li></ul></ul></ul><ul><ul><ul><li>test </li></ul></ul></ul><ul><ul><ul><li>package </li></ul></ul></ul><ul><ul><ul><li>integration-test </li></ul></ul></ul><ul><ul><ul><li>verify </li></ul></ul></ul><ul><ul><ul><li>install </li></ul></ul></ul><ul><ul><ul><li>deploy </li></ul></ul></ul>Soaring Eagle L.L.C
  4. 4. Maven 2.0 lifecycle <ul><ul><li>Lifecycle phases are executed in order </li></ul></ul><ul><ul><li>Goals are assigned to phases based on project type (jar) </li></ul></ul><ul><ul><ul><li>Compile - compiler:compile </li></ul></ul></ul><ul><ul><ul><li>Package - jar:jar </li></ul></ul></ul><ul><ul><li>Phases have dependencies and previous phases are always executed. </li></ul></ul><ul><ul><li>Plugin goals can tie to lifecycle phases </li></ul></ul>Soaring Eagle L.L.C
  5. 5. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Pom configuration </li></ul></ul>Soaring Eagle L.L.C
  6. 6. Plug-in Packaging Soaring Eagle L.L.C
  7. 7. Required Resources <ul><ul><li>Java Plug-ins </li></ul></ul><ul><ul><ul><li>Pom.xml </li></ul></ul></ul><ul><ul><ul><li>Java Code </li></ul></ul></ul><ul><ul><li>Ant Plug-ins </li></ul></ul><ul><ul><ul><li>Pom.xml </li></ul></ul></ul><ul><ul><ul><li>basename.build.xml </li></ul></ul></ul><ul><ul><ul><li>basename.mojos.xml </li></ul></ul></ul>Soaring Eagle L.L.C
  8. 8. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Pom configuration </li></ul></ul>Soaring Eagle L.L.C
  9. 9. Hello World Soaring Eagle L.L.C
  10. 10. Hello with Parameters Soaring Eagle L.L.C
  11. 11. Pom.xml Soaring Eagle L.L.C
  12. 12. Using the plug-in Soaring Eagle L.L.C
  13. 13. Configuring Parameters Soaring Eagle L.L.C
  14. 14. Configuring Complex Parameter types <ul><ul><li>Boolean </li></ul></ul><ul><ul><li>Dates </li></ul></ul><ul><ul><li>URL ’ s </li></ul></ul><ul><ul><li>Lists </li></ul></ul><ul><ul><li>Maps </li></ul></ul><ul><ul><li>Properties </li></ul></ul>Soaring Eagle L.L.C
  15. 15. List example Soaring Eagle L.L.C
  16. 16. Let ’s look at the Weblogic Plug-in Soaring Eagle L.L.C
  17. 17. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Pom configuration </li></ul></ul>Soaring Eagle L.L.C
  18. 18. Build.xml Soaring Eagle L.L.C
  19. 19. Mojos.xml Soaring Eagle L.L.C
  20. 20. Using the Ant mojo in a project Soaring Eagle L.L.C
  21. 21. Adding Parameters basename.build.xml Soaring Eagle L.L.C
  22. 22. Adding Parameters basename.mojos.xml Soaring Eagle L.L.C
  23. 23. Soaring Eagle L.L.C
  24. 24. Project configuration Soaring Eagle L.L.C
  25. 25. Soaring Eagle L.L.C
  26. 26. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Real Code </li></ul></ul>Soaring Eagle L.L.C
  27. 27. Packaging <ul><ul><li>Handled by plug-in support </li></ul></ul><ul><ul><li>mvn plugin:install </li></ul></ul><ul><ul><li>Can support multiple versions </li></ul></ul><ul><ul><li>settings.xml or pom.xml determine version strategies </li></ul></ul><ul><ul><li>Plug-in registry allows you to control plug-in versions </li></ul></ul>Soaring Eagle L.L.C
  28. 28. Soaring Eagle L.L.C
  29. 29. Agenda <ul><ul><li>Maven Lifecycle </li></ul></ul><ul><ul><li>Plugin project layout </li></ul></ul><ul><ul><li>Java Plugin Example </li></ul></ul><ul><ul><li>Ant Plugin Example </li></ul></ul><ul><ul><li>Plugin packaging </li></ul></ul><ul><ul><li>Real Code </li></ul></ul>Soaring Eagle L.L.C

×