Maven for Dummies

Tomer Gabel
Tomer GabelConsulting Engineer at Substrate Software Services
A JJTV tool night presentation
Tomer Gabel, November 2012
 Maven is not news…

 … but it’s not well-understood either

 Let’s go back to basics
 A lifecycle management tool
  Not just a build system

 Declarative
  Not a script!

 Modular
  Everything is a plugin
Phases                                                                              Goals
          • process-resources
compile   • compile                                                                resources:resources   compiler:compile

                                • process-test-resources
             test               • test-compile
                                • test




                            package                • prepare-package                 resources:test-      compiler:test-
                                                   • package
                                                                                        resources           compile
                                                                       • verify
                                                    deploy             • install
                                                                       • deploy




                                                                                      surefire:test          war:war
Hierarchy


               POM


Dependencies         Configuration
   XML
     *sigh* … yeah


   Artifact descriptor

   Hierarchy

   Dependencies
   POMs reference POMs

     Group, artifact, version


   Repository lookup

     Local repository
      (“cache”)

     Remote repositories
   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)
   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
1 of 9

Recommended

Maven 3 Overview by
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
2.7K views22 slides
Note - Apache Maven Intro by
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
2.6K views15 slides
Maven Overview by
Maven OverviewMaven Overview
Maven OverviewFastConnect
8.5K views29 slides
Apache Maven In 10 Slides by
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 SlidesRobert Burrell Donkin
5.7K views12 slides
Maven by
Maven Maven
Maven Khan625
905 views9 slides
An introduction to Maven by
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
7.9K views78 slides

More Related Content

What's hot

Build Automation using Maven by
Build Automation using Maven Build Automation using Maven
Build Automation using Maven Ankit Gubrani
3.7K views45 slides
Introduction to maven by
Introduction to mavenIntroduction to maven
Introduction to mavenManos Georgopoulos
1.2K views24 slides
Maven Introduction by
Maven IntroductionMaven Introduction
Maven IntroductionSandeep Chawla
21.1K views31 slides
Maven Basics - Explained by
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
1.1K views46 slides
Introduction to Maven by
Introduction to MavenIntroduction to Maven
Introduction to MavenOnkar Deshpande
3.4K views67 slides
Apache Maven by
Apache MavenApache Maven
Apache MavenRahul Tanwani
2.1K views35 slides

What's hot(20)

Build Automation using Maven by Ankit Gubrani
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
Ankit Gubrani3.7K views
Maven Basics - Explained by Smita Prasad
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad1.1K views
Maven by feng lee
MavenMaven
Maven
feng lee1.8K views
An Introduction to Maven Part 1 by MD Sayem Ahmed
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed899 views
Learning Maven by Example by Hsi-Kai Wang
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
Hsi-Kai Wang1.6K views
Java Builds with Maven and Ant by David Noble
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
David Noble2.4K views
Maven plugins, properties en profiles: Advanced concepts in Maven by Geert Pante
Maven plugins, properties en profiles: Advanced concepts in MavenMaven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in Maven
Geert Pante2.6K views
Hands On with Maven by Sid Anand
Hands On with MavenHands On with Maven
Hands On with Maven
Sid Anand6.1K views
Continuous Deployment Pipeline with maven by Alan Parkinson
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
Alan Parkinson7.6K views
An Introduction to Maven by Vadym Lotar
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar13.9K views
Maven Presentation - SureFire vs FailSafe by Holasz Kati
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
Holasz Kati1.4K views
Version Management in Maven by Geert Pante
Version Management in MavenVersion Management in Maven
Version Management in Maven
Geert Pante11.9K views

Viewers also liked

Continuous delivery-with-maven by
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-mavenJohn Ferguson Smart Limited
60.3K views96 slides
Maven tutorial for beginners by
Maven tutorial for beginnersMaven tutorial for beginners
Maven tutorial for beginnersinTwentyEight Minutes
307 views13 slides
Lorraine JUG (1st June, 2010) - Maven by
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenArnaud Héritier
1.1K views141 slides
Mastering Maven 2.0 In 1 Hour V1.3 by
Mastering Maven 2.0 In 1 Hour V1.3Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Matthew McCullough
3.5K views165 slides
Maven from dummies by
Maven from dummiesMaven from dummies
Maven from dummiesfirenze-gtug
661 views10 slides
Maven overview by
Maven overviewMaven overview
Maven overviewYukti Kaura
1.3K views40 slides

Viewers also liked(19)

Lorraine JUG (1st June, 2010) - Maven by Arnaud Héritier
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
Arnaud Héritier1.1K views
Maven overview by Yukti Kaura
Maven overviewMaven overview
Maven overview
Yukti Kaura1.3K views
Tycho Tutorial (EclipseCon 2012) by jsievers
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
jsievers4.5K views
Análise de qualidade de código com Sonar - Fernando Boaglio by Fernando Boaglio
Análise de qualidade de código com Sonar - Fernando Boaglio Análise de qualidade de código com Sonar - Fernando Boaglio
Análise de qualidade de código com Sonar - Fernando Boaglio
Fernando Boaglio536 views
Continuous inspection with Sonar by gaudol
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
gaudol2.3K views
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso... by ZeroTurnaround
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
ZeroTurnaround90K views
Scala in practice by Tomer Gabel
Scala in practiceScala in practice
Scala in practice
Tomer Gabel25.5K views

Similar to Maven for Dummies

Practical maven-slides 2 by
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2Will Iverson
2.4K views16 slides
Java build tools by
Java build toolsJava build tools
Java build toolsSujit Kumar
79 views23 slides
4 maven junit by
4 maven junit4 maven junit
4 maven junitHonnix Liang
692 views43 slides
P&MSP2012 - Maven by
P&MSP2012 - MavenP&MSP2012 - Maven
P&MSP2012 - MavenDaniele Dell'Aglio
484 views18 slides
Introduction in Apache Maven2 by
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2Heiko Scherrer
870 views40 slides
Jenkins advance topic by
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
182 views29 slides

Similar to Maven for Dummies(20)

Practical maven-slides 2 by Will Iverson
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2
Will Iverson2.4K views
Introduction in Apache Maven2 by Heiko Scherrer
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2
Heiko Scherrer870 views
Jenkins advance topic by Gourav Varma
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma182 views
Automated testing with Drupal by Promet Source
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
Promet Source7.4K views
Introduction tomaven by Manav Prasad
Introduction tomavenIntroduction tomaven
Introduction tomaven
Manav Prasad236 views
Introduction to maven, its configuration, lifecycle and relationship to JS world by Dmitry Bakaleinik
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik691 views
(Re)-Introduction to Maven by Eric Wyles
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles127 views
InSpec For DevOpsDays Amsterdam 2017 by Mandi Walls
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017
Mandi Walls388 views
Linuxtag 2012 - continuous delivery - dream to reality by Clément Escoffier
Linuxtag 2012  - continuous delivery - dream to realityLinuxtag 2012  - continuous delivery - dream to reality
Linuxtag 2012 - continuous delivery - dream to reality
Clément Escoffier1.2K views

More from Tomer Gabel

How shit works: Time by
How shit works: TimeHow shit works: Time
How shit works: TimeTomer Gabel
342 views53 slides
Nondeterministic Software for the Rest of Us by
Nondeterministic Software for the Rest of UsNondeterministic Software for the Rest of Us
Nondeterministic Software for the Rest of UsTomer Gabel
329 views39 slides
Slaying Sacred Cows: Deconstructing Dependency Injection by
Slaying Sacred Cows: Deconstructing Dependency InjectionSlaying Sacred Cows: Deconstructing Dependency Injection
Slaying Sacred Cows: Deconstructing Dependency InjectionTomer Gabel
1.3K views34 slides
An Abridged Guide to Event Sourcing by
An Abridged Guide to Event SourcingAn Abridged Guide to Event Sourcing
An Abridged Guide to Event SourcingTomer Gabel
1K views32 slides
How shit works: the CPU by
How shit works: the CPUHow shit works: the CPU
How shit works: the CPUTomer Gabel
1.8K views38 slides
How Shit Works: Storage by
How Shit Works: StorageHow Shit Works: Storage
How Shit Works: StorageTomer Gabel
914 views44 slides

More from Tomer Gabel(20)

How shit works: Time by Tomer Gabel
How shit works: TimeHow shit works: Time
How shit works: Time
Tomer Gabel342 views
Nondeterministic Software for the Rest of Us by Tomer Gabel
Nondeterministic Software for the Rest of UsNondeterministic Software for the Rest of Us
Nondeterministic Software for the Rest of Us
Tomer Gabel329 views
Slaying Sacred Cows: Deconstructing Dependency Injection by Tomer Gabel
Slaying Sacred Cows: Deconstructing Dependency InjectionSlaying Sacred Cows: Deconstructing Dependency Injection
Slaying Sacred Cows: Deconstructing Dependency Injection
Tomer Gabel1.3K views
An Abridged Guide to Event Sourcing by Tomer Gabel
An Abridged Guide to Event SourcingAn Abridged Guide to Event Sourcing
An Abridged Guide to Event Sourcing
Tomer Gabel1K views
How shit works: the CPU by Tomer Gabel
How shit works: the CPUHow shit works: the CPU
How shit works: the CPU
Tomer Gabel1.8K views
How Shit Works: Storage by Tomer Gabel
How Shit Works: StorageHow Shit Works: Storage
How Shit Works: Storage
Tomer Gabel914 views
Java 8 and Beyond, a Scala Story by Tomer Gabel
Java 8 and Beyond, a Scala StoryJava 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala Story
Tomer Gabel747 views
The Wix Microservice Stack by Tomer Gabel
The Wix Microservice StackThe Wix Microservice Stack
The Wix Microservice Stack
Tomer Gabel1.7K views
Scala Refactoring for Fun and Profit (Japanese subtitles) by Tomer Gabel
Scala Refactoring for Fun and Profit (Japanese subtitles)Scala Refactoring for Fun and Profit (Japanese subtitles)
Scala Refactoring for Fun and Profit (Japanese subtitles)
Tomer Gabel6.6K views
Scala Refactoring for Fun and Profit by Tomer Gabel
Scala Refactoring for Fun and ProfitScala Refactoring for Fun and Profit
Scala Refactoring for Fun and Profit
Tomer Gabel985 views
Onboarding at Scale by Tomer Gabel
Onboarding at ScaleOnboarding at Scale
Onboarding at Scale
Tomer Gabel1.5K views
Scala in the Wild by Tomer Gabel
Scala in the WildScala in the Wild
Scala in the Wild
Tomer Gabel2.8K views
Speaking Scala: Refactoring for Fun and Profit (Workshop) by Tomer Gabel
Speaking Scala: Refactoring for Fun and Profit (Workshop)Speaking Scala: Refactoring for Fun and Profit (Workshop)
Speaking Scala: Refactoring for Fun and Profit (Workshop)
Tomer Gabel765 views
Put Your Thinking CAP On by Tomer Gabel
Put Your Thinking CAP OnPut Your Thinking CAP On
Put Your Thinking CAP On
Tomer Gabel3.5K views
Leveraging Scala Macros for Better Validation by Tomer Gabel
Leveraging Scala Macros for Better ValidationLeveraging Scala Macros for Better Validation
Leveraging Scala Macros for Better Validation
Tomer Gabel1.4K views
A Field Guide to DSL Design in Scala by Tomer Gabel
A Field Guide to DSL Design in ScalaA Field Guide to DSL Design in Scala
A Field Guide to DSL Design in Scala
Tomer Gabel6.5K views
Functional Leap of Faith (Keynote at JDay Lviv 2014) by Tomer Gabel
Functional Leap of Faith (Keynote at JDay Lviv 2014)Functional Leap of Faith (Keynote at JDay Lviv 2014)
Functional Leap of Faith (Keynote at JDay Lviv 2014)
Tomer Gabel1.5K views
Scala Back to Basics: Type Classes by Tomer Gabel
Scala Back to Basics: Type ClassesScala Back to Basics: Type Classes
Scala Back to Basics: Type Classes
Tomer Gabel3.7K views
5 Bullets to Scala Adoption by Tomer Gabel
5 Bullets to Scala Adoption5 Bullets to Scala Adoption
5 Bullets to Scala Adoption
Tomer Gabel2.7K views
Nashorn: JavaScript that doesn’t suck (ILJUG) by Tomer Gabel
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)
Tomer Gabel5.9K views

Recently uploaded

handbook for web 3 adoption.pdf by
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdfLiveplex
22 views16 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
15 views1 slide
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
263 views86 slides
Mini-Track: Challenges to Network Automation Adoption by
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation AdoptionNetwork Automation Forum
12 views27 slides
Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
12 views36 slides
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
52 views8 slides

Recently uploaded(20)

handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex22 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta26 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada127 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views

Maven for Dummies

  • 1. A JJTV tool night presentation Tomer Gabel, November 2012
  • 2.  Maven is not news…  … but it’s not well-understood either  Let’s go back to basics
  • 3.  A lifecycle management tool  Not just a build system  Declarative  Not a script!  Modular  Everything is a plugin
  • 4. Phases Goals • process-resources compile • compile resources:resources compiler:compile • process-test-resources test • test-compile • test package • prepare-package resources:test- compiler:test- • package resources compile • verify deploy • install • deploy surefire:test war:war
  • 5. Hierarchy POM Dependencies Configuration
  • 6. XML  *sigh* … yeah  Artifact descriptor  Hierarchy  Dependencies
  • 7. POMs reference POMs  Group, artifact, version  Repository lookup  Local repository (“cache”)  Remote repositories
  • 8. 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)
  • 9. 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