Introduction to
    Maven2
  Sapporo Java Community
      Shuji Watanabe
What Maven2



http://maven.apache.org/
Project Management?
Why Maven2
CoC / Convention over Configuration




DRY / Dont Repeat Yourself

  pom          multi project
Requments

JDK 1.4 or above
Setup
Download
           JAVA_HOME

Maven2/bin
Maven2 Project
POM (Project Object Model)
  pom.xml /



Eclipse -> maven2 eclipse plugin
NetBeans -> NetBeans maven plugin
Create Maven Project
mvn archetype:create
    plugin     command

plugin

command

http://maven.apache.org/plugins/
Create Maven2 Project
 mvn archetype:create
 -DgroupId=jp.example -DartifactId=aaa
 archetype =

 groupId

 artifactId

  ...
Project structure
ProjectRoot/
 + src/
 | + main/
 | | + java/          ... source
 | | + resources/
 | + test/
 |     + j...
Dependency
        Management
dependencies

GroupId, ArtifactId,Version


scope / compile, test,provide
<dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</...
Repositories


Central
Local
Bender / seasar2, java.net, internal
Life Cycle and Goal
   default     clean
  compile
                site
    test

  package

   install

   deploy
Next...
Customize Project
Eclipse / Netbeans
Report (Test Report, Coverage, JavaDoc)
Multi Module Project
CI (Continuous I...
Upcoming SlideShare
Loading in …5
×

Introduction To Maven2

3,628 views
3,558 views

Published on

Sapporo Java Comunitiy Workshop vol.11
About Maven2

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,628
On SlideShare
0
From Embeds
0
Number of Embeds
420
Actions
Shares
0
Downloads
88
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Introduction To Maven2

  1. 1. Introduction to Maven2 Sapporo Java Community Shuji Watanabe
  2. 2. What Maven2 http://maven.apache.org/
  3. 3. Project Management?
  4. 4. Why Maven2 CoC / Convention over Configuration DRY / Dont Repeat Yourself pom multi project
  5. 5. Requments JDK 1.4 or above
  6. 6. Setup Download JAVA_HOME Maven2/bin
  7. 7. Maven2 Project POM (Project Object Model) pom.xml / Eclipse -> maven2 eclipse plugin NetBeans -> NetBeans maven plugin
  8. 8. Create Maven Project mvn archetype:create plugin command plugin command http://maven.apache.org/plugins/
  9. 9. Create Maven2 Project mvn archetype:create -DgroupId=jp.example -DartifactId=aaa archetype = groupId artifactId jp.example.aaa
  10. 10. Project structure ProjectRoot/ + src/ | + main/ | | + java/ ... source | | + resources/ | + test/ | + java/ ... test source | + resources/ + pom.xml
  11. 11. Dependency Management dependencies GroupId, ArtifactId,Version scope / compile, test,provide
  12. 12. <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies>
  13. 13. Repositories Central Local Bender / seasar2, java.net, internal
  14. 14. Life Cycle and Goal default clean compile site test package install deploy
  15. 15. Next... Customize Project Eclipse / Netbeans Report (Test Report, Coverage, JavaDoc) Multi Module Project CI (Continuous Integration/ Hudson)

×