9
Maven for Dummies A JJTV tool night presentation Tomer Gabel, November 2012

Maven for Dummies

Embed Size (px)

DESCRIPTION

A flash lecture given at the JJTV Tool Night #4 on 6 November, 2012. The full lecture video (in Hebrew) can be found at http://www.youtube.com/watch?v=ozl6oBmAj1Y

Citation preview

Page 1: Maven for Dummies

Maven for Dummies

A JJTV tool night presentationTomer Gabel, November 2012

Page 2: Maven for Dummies

Agenda

Maven is not news…

… but it’s not well-understood either

Let’s go back to basics

Page 3: Maven for Dummies

Maven is…

A lifecycle management tool Not just a build system

Declarative Not a script!

Modular Everything is a plugin

Page 4: Maven for Dummies

Project lifecycle

compile

•process-resources

•compile

test•process-test-resources

• test-compile• test

package

•prepare-package

•package

deploy•verify• install•deploy

resources:resources

compiler:compile

resources:test-resources

compiler:test-compile

surefire:test war:war

Phases Goals

Page 5: Maven for Dummies

Project object model

POM

Hierarchy

Configuration

Dependencies

Page 6: Maven for Dummies

What’s in a POM?

XML *sigh* … yeah

Artifact descriptor

Hierarchy

Dependencies

Page 7: Maven for Dummies

Dependency management POMs reference

POMs

Group, artifact, version

Repository lookup

Local repository (“cache”)

Remote repositories

Page 8: Maven for Dummies

Using Maven effectively

Convention over configuration

Stick to the conventions if possible

Keep it simple

Avoid complex setups (e.g. multiple repositories)

Avoid feature creep (stick to common plugins)

Page 9: Maven for Dummies

Thanks for listening!

Useful links Maven home: http://maven.apache.org Central repository:

http://search.maven.org

Me! Blog: http://www.tomergabel.com Twitter: @tomerg LinkedIn: http://il.linkedin.com/in/

tomergabel