Introduction to Maven 2
Basics <ul><li>Convention over Configuration </li></ul><ul><li>Declarative project management </li></ul><ul><li>DRY </li><...
Build Lifecycles <ul><li>Default </li></ul><ul><li>Site </li></ul><ul><li>Clean </li></ul>
Dependency Management <ul><li>Declarative </li></ul><ul><li>Transitive </li></ul><ul><li>3 qualifiers per dependency </li>...
Repositories <ul><li>Place where all jars are stored </li></ul><ul><li>Local </li></ul><ul><li>Network / proxy </li></ul><...
Archetypes <ul><li>Project templates </li></ul><ul><li>Available for various project types </li></ul><ul><li>DEMO – create...
Reports <ul><li>Monitor code health </li></ul><ul><li>Metrics </li></ul><ul><li>Code Coverage </li></ul><ul><li>View codeb...
Mavenizing your project <ul><li>Modify build section: </li></ul><ul><li><build> </li></ul><ul><li><sourceDirectory>srcDir<...
Multi – module projects <ul><li>Use <dependencyManagement> to make your life easier </li></ul><ul><li>mvn install needed w...
Resources <ul><li>http://maven.apache.org </li></ul><ul><li>http://del.icio.us/jimbethancourt/maven </li></ul>
Upcoming SlideShare
Loading in...5
×

Maven Introduction

306

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
306
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Maven Introduction

  1. 1. Introduction to Maven 2
  2. 2. Basics <ul><li>Convention over Configuration </li></ul><ul><li>Declarative project management </li></ul><ul><li>DRY </li></ul>
  3. 3. Build Lifecycles <ul><li>Default </li></ul><ul><li>Site </li></ul><ul><li>Clean </li></ul>
  4. 4. Dependency Management <ul><li>Declarative </li></ul><ul><li>Transitive </li></ul><ul><li>3 qualifiers per dependency </li></ul><ul><ul><li>GroupId </li></ul></ul><ul><ul><li>AritfactId </li></ul></ul><ul><ul><li>Version </li></ul></ul><ul><li>Coping with Sun jars </li></ul>
  5. 5. Repositories <ul><li>Place where all jars are stored </li></ul><ul><li>Local </li></ul><ul><li>Network / proxy </li></ul><ul><li>Central </li></ul>
  6. 6. Archetypes <ul><li>Project templates </li></ul><ul><li>Available for various project types </li></ul><ul><li>DEMO – create sample JSF app </li></ul><ul><li>mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven -DarchetypeArtifactId=maven-archetype-myfaces -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=testApp </li></ul>
  7. 7. Reports <ul><li>Monitor code health </li></ul><ul><li>Metrics </li></ul><ul><li>Code Coverage </li></ul><ul><li>View codebase as a webpage </li></ul><ul><li>Track changes </li></ul>
  8. 8. Mavenizing your project <ul><li>Modify build section: </li></ul><ul><li><build> </li></ul><ul><li><sourceDirectory>srcDir</sourceDirectory> </li></ul><ul><li><testSourceDirectory>testDir </testSourceDirectory> … </li></ul><ul><li></build> </li></ul>
  9. 9. Multi – module projects <ul><li>Use <dependencyManagement> to make your life easier </li></ul><ul><li>mvn install needed w/ inherited test classes </li></ul><ul><li>Let’s look at Terracotta.org’s codebase </li></ul>
  10. 10. Resources <ul><li>http://maven.apache.org </li></ul><ul><li>http://del.icio.us/jimbethancourt/maven </li></ul>

×