Introduction to Apache Maven

26
Apache maven Introduction to

description

A talk on Maven in Apache Asia Roadshow 2010

Transcript of Introduction to Apache Maven

Page 1: Introduction to Apache Maven

Apache maven

Introduction to

Page 2: Introduction to Apache Maven

Juven Xu

www.juvenxu.com

[email protected]

twitter.com/juvenxu

Page 3: Introduction to Apache Maven

So, What Is Maven?

Page 4: Introduction to Apache Maven

BIR2D

Page 5: Introduction to Apache Maven

Build

Information Aggregation

Rule

Repository

Dependency Management

Page 6: Introduction to Apache Maven

We all build software

But…

Not all in the same way

Page 7: Introduction to Apache Maven

People all use water

But…

Not all in the same way

Page 8: Introduction to Apache Maven

The Maven Way…

Page 9: Introduction to Apache Maven

I don’t like the feeling of being empty

Hey buddy, you are not alone, here we come

Page 10: Introduction to Apache Maven

same informationsame place

Page 11: Introduction to Apache Maven

- pom.xml- src/main/java- src/main/resources- src/test/java- src/test/resources- …

No Rule, No Game

Page 12: Introduction to Apache Maven

Convention Over Configuration

Page 13: Introduction to Apache Maven
Page 14: Introduction to Apache Maven

LocalLocal

RemoteRemote

CentralCentral

~/.m2/repository~/.m2/repository http://repo1.maven.org/maven2/http://repo1.maven.org/maven2/

RemoteRemote

What’s missing?

Page 15: Introduction to Apache Maven
Page 16: Introduction to Apache Maven

No Repository Manager ?

Page 17: Introduction to Apache Maven

I bet you know this

But I’m talking Nexus, no ‘one’

Page 18: Introduction to Apache Maven

timebandwidthmoney

Page 19: Introduction to Apache Maven

Where Am I?

Page 20: Introduction to Apache Maven

a:3.1.1my-app:1.0-SNAPSHOT

c:1.1

d:1.0d:1.0

b:2.0d:0.9

BIR2D

Page 21: Introduction to Apache Maven

SNAPSHOT

a timestamped version

Page 22: Introduction to Apache Maven

POM is just a carrier of BIR2D

Page 23: Introduction to Apache Maven

maven

Page 24: Introduction to Apache Maven

report

build

deploypoll

commit

commit

commitdev

SCM Reposi tory(Subversi on)dev

dev

HudsonNexus

Continuous Integration

Page 25: Introduction to Apache Maven

coming soon…coming soon…

Page 26: Introduction to Apache Maven

Q&A