SlideShare a Scribd company logo
APACHE MAVEN
What is Maven?
● Software Project Management tool
● Based on the concept of Project Object Model(POM)
● A build lifecycle framework
● Automate build infrastructure
● Ability to manage build, reporting, documentation, scm’
s, dependecies, unit testing, mailing lists...
What does it provide?
Standardizes the Project Build Process
● Designed to simplify the process of Jakarta Turbine
Project.
● Several projects with slightly different ANT file.
● JAR’s were checked in CVS’s
● MAVEN developed to build multiple project’s together
History of Maven
● Provide comprehensive model
● Provide plugins that interact with this comprehensive
model
● Convention over Configuration
● Project Object Model (POM)
Objective of Maven
● Fundamental unit of Maven
● Contains information about the project and
configuration details
● Contains goals and plugins
● Uniquely identified by GroupId and ArtifactId
● POM’s inherit from parent POM’s
Project Object Model (POM)
Well defined sequence of phases, which
defines the order in which goals are executed.
Maven Build Lifecycle
A typical Maven build lifecycle
Maven Build Lifecycle
Phase Handles Description
prepare-resources resource copying Resource copying can be customized in this
phase.
compile compilation Source code compilation is done in this phase.
package packaging This phase creates the JAR / WAR package as
mentioned in packaging in POM.xml.
install installation This phase installs the package in local / remote
maven repository.
● 3 standard Lifecycles
○ Clean
○ Build
○ Site
● The order of execution depends on which goals and
build phases are invoked
Maven Build Lifecycle
● Maven clean goal is bound to clean phase
● Maven deletes the output of the build
Clean Lifecycle
● Primary lifecycle of Maven
● It has 23 phases
● Compile, Install ,Package phases are some
examples
Build Lifecycle
● Create Documentation
● Create Reports
● Deploy Site
Site Lifecycle
● Set of configuration values, which can be used to set or override the
default values.
● Maven profile helps you customise your build for diff environments like
deployment or production
● Build profiles are specified in the pom.xml and it modifies the pom.xml at
build time based on the target environment.
● Build profile is of three types:
○ Per Project
○ Per User
○ Global
● mvn test -Ptest
Maven Build Profile
● Repository is a place where all the project jar’s, library jars, plugins and
project artifacts are stored and can be accessed by maven easily.
● There are 3 types of repositories: Local, Central and Remote.
● Local - Is the one Maven creates in the system
● Central - Maintained by Maven community
● Remote - Maintained by the user
Maven Repositories
● Maven is a plugin execution framework where all the tasks are done by
plugins.
● Plugins can create jar/war, compile code, run unit tests, create project
reports and documents.
● mvn compiler:compile
● Two types of plugins:
○ Build - Executes during the build phase and should be configured in
the build element.
○ Reporting - Executes during the site phase and should be configured
in the reporting element.
Maven Plugins
● Maven uses archetype plugins to create project.
● mvn archetype:generate
-DgroupId=com.companyname.software
-DartifactId=financialService
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
Creating Maven Projects

More Related Content

What's hot

Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
Testing Rest with Spring  by Kostiantyn Baranov (Senior Software Engineer, Gl...Testing Rest with Spring  by Kostiantyn Baranov (Senior Software Engineer, Gl...
Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
GlobalLogic Ukraine
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
Yankee Nemoy
 
Vpm
VpmVpm
JenkinsCI
JenkinsCIJenkinsCI
JenkinsCI
Chandrika Gole
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystem
Alex Tumanoff
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Next generation repository
OpenCms Days 2015  Next generation repositoryOpenCms Days 2015  Next generation repository
OpenCms Days 2015 Next generation repository
Alkacon Software GmbH & Co. KG
 
Cli jbug
Cli jbugCli jbug
Cli jbug
maeste
 
Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014
Ioan Eugen Stan
 
Maven plugins, properties en profiles: Advanced concepts in Maven
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 Pante
 
Apache Maven
Apache MavenApache Maven
Apache Maven
eurosigdoc acm
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
Alkacon Software GmbH & Co. KG
 
Ruby in mule
Ruby in muleRuby in mule
Ruby in mule
Ramakrishna kapa
 
JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개
Ted Won
 
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Per Henrik Lausten
 
Linux Kernel Selftest Framework - Quality Control for New Releases
Linux Kernel Selftest Framework - Quality Control for New ReleasesLinux Kernel Selftest Framework - Quality Control for New Releases
Linux Kernel Selftest Framework - Quality Control for New Releases
Samsung Open Source Group
 
Continous Delivery with CQ
Continous Delivery with CQContinous Delivery with CQ
Continous Delivery with CQ
olibur
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
Onkar Deshpande
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?
Alkacon Software GmbH & Co. KG
 

What's hot (20)

Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
Testing Rest with Spring  by Kostiantyn Baranov (Senior Software Engineer, Gl...Testing Rest with Spring  by Kostiantyn Baranov (Senior Software Engineer, Gl...
Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 
Vpm
VpmVpm
Vpm
 
JenkinsCI
JenkinsCIJenkinsCI
JenkinsCI
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystem
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository
 
OpenCms Days 2015 Next generation repository
OpenCms Days 2015  Next generation repositoryOpenCms Days 2015  Next generation repository
OpenCms Days 2015 Next generation repository
 
Cli jbug
Cli jbugCli jbug
Cli jbug
 
Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014
 
Maven plugins, properties en profiles: Advanced concepts in Maven
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
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
 
Ruby in mule
Ruby in muleRuby in mule
Ruby in mule
 
JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개
 
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)
 
Linux Kernel Selftest Framework - Quality Control for New Releases
Linux Kernel Selftest Framework - Quality Control for New ReleasesLinux Kernel Selftest Framework - Quality Control for New Releases
Linux Kernel Selftest Framework - Quality Control for New Releases
 
Continous Delivery with CQ
Continous Delivery with CQContinous Delivery with CQ
Continous Delivery with CQ
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?
 

Similar to Apache maven

An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma
 
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Ravi Soni
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
Ankur Goyal
 
Java build tools
Java build toolsJava build tools
Java build tools
Sujit Kumar
 
Maven in Java EE project
Maven in Java EE projectMaven in Java EE project
Maven in Java EE project
Ondrej Mihályi
 
Maven
MavenMaven
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
Ankit Gubrani
 
Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introduction
Sergii Fesenko
 
Maven
MavenMaven
Maven
MavenMaven
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
AnkurSingh656748
 
Build tool
Build toolBuild tool
Build tool
Mallikarjuna G D
 
Maven
MavenMaven
Maven
MavenMaven
Apache ANT vs Apache Maven
Apache ANT vs Apache MavenApache ANT vs Apache Maven
Apache ANT vs Apache Maven
Mudit Gupta
 
tools cli java
tools cli javatools cli java
tools cli java
TiNguyn863920
 
What is maven
What is mavenWhat is maven
What is maven
sureshraj43
 
Maven basics
Maven basicsMaven basics
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
venkata20k
 

Similar to Apache maven (20)

An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Java build tools
Java build toolsJava build tools
Java build tools
 
Maven in Java EE project
Maven in Java EE projectMaven in Java EE project
Maven in Java EE project
 
Maven
MavenMaven
Maven
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introduction
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Build tool
Build toolBuild tool
Build tool
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Apache ANT vs Apache Maven
Apache ANT vs Apache MavenApache ANT vs Apache Maven
Apache ANT vs Apache Maven
 
tools cli java
tools cli javatools cli java
tools cli java
 
What is maven
What is mavenWhat is maven
What is maven
 
Maven basics
Maven basicsMaven basics
Maven basics
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 

Recently uploaded

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
ramrag33
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 

Recently uploaded (20)

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 

Apache maven

  • 2. What is Maven? ● Software Project Management tool ● Based on the concept of Project Object Model(POM)
  • 3. ● A build lifecycle framework ● Automate build infrastructure ● Ability to manage build, reporting, documentation, scm’ s, dependecies, unit testing, mailing lists... What does it provide?
  • 4. Standardizes the Project Build Process
  • 5. ● Designed to simplify the process of Jakarta Turbine Project. ● Several projects with slightly different ANT file. ● JAR’s were checked in CVS’s ● MAVEN developed to build multiple project’s together History of Maven
  • 6. ● Provide comprehensive model ● Provide plugins that interact with this comprehensive model ● Convention over Configuration ● Project Object Model (POM) Objective of Maven
  • 7. ● Fundamental unit of Maven ● Contains information about the project and configuration details ● Contains goals and plugins ● Uniquely identified by GroupId and ArtifactId ● POM’s inherit from parent POM’s Project Object Model (POM)
  • 8. Well defined sequence of phases, which defines the order in which goals are executed. Maven Build Lifecycle
  • 9. A typical Maven build lifecycle Maven Build Lifecycle Phase Handles Description prepare-resources resource copying Resource copying can be customized in this phase. compile compilation Source code compilation is done in this phase. package packaging This phase creates the JAR / WAR package as mentioned in packaging in POM.xml. install installation This phase installs the package in local / remote maven repository.
  • 10. ● 3 standard Lifecycles ○ Clean ○ Build ○ Site ● The order of execution depends on which goals and build phases are invoked Maven Build Lifecycle
  • 11. ● Maven clean goal is bound to clean phase ● Maven deletes the output of the build Clean Lifecycle
  • 12. ● Primary lifecycle of Maven ● It has 23 phases ● Compile, Install ,Package phases are some examples Build Lifecycle
  • 13. ● Create Documentation ● Create Reports ● Deploy Site Site Lifecycle
  • 14. ● Set of configuration values, which can be used to set or override the default values. ● Maven profile helps you customise your build for diff environments like deployment or production ● Build profiles are specified in the pom.xml and it modifies the pom.xml at build time based on the target environment. ● Build profile is of three types: ○ Per Project ○ Per User ○ Global ● mvn test -Ptest Maven Build Profile
  • 15. ● Repository is a place where all the project jar’s, library jars, plugins and project artifacts are stored and can be accessed by maven easily. ● There are 3 types of repositories: Local, Central and Remote. ● Local - Is the one Maven creates in the system ● Central - Maintained by Maven community ● Remote - Maintained by the user Maven Repositories
  • 16. ● Maven is a plugin execution framework where all the tasks are done by plugins. ● Plugins can create jar/war, compile code, run unit tests, create project reports and documents. ● mvn compiler:compile ● Two types of plugins: ○ Build - Executes during the build phase and should be configured in the build element. ○ Reporting - Executes during the site phase and should be configured in the reporting element. Maven Plugins
  • 17. ● Maven uses archetype plugins to create project. ● mvn archetype:generate -DgroupId=com.companyname.software -DartifactId=financialService -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false Creating Maven Projects