SlideShare a Scribd company logo
1 of 17
Download to read offline
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

Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build Technology
Philip Johnson
 
Configuration Management
Configuration ManagementConfiguration Management
Configuration Management
elliando dias
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
Chandan Chaurasia
 
Configuration management
Configuration managementConfiguration management
Configuration management
ashamarsha
 
Software configuration management
Software configuration managementSoftware configuration management
Software configuration management
Julia Carolina
 

What's hot (20)

Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build Technology
 
Hassle Free Issue tracking with redmine
Hassle Free Issue tracking with redmineHassle Free Issue tracking with redmine
Hassle Free Issue tracking with redmine
 
Configuration Management
Configuration ManagementConfiguration Management
Configuration Management
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with Subversion
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
 
ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
 
Software configuration management in deep
Software configuration management in deepSoftware configuration management in deep
Software configuration management in deep
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Scm PPT
Scm PPTScm PPT
Scm PPT
 
Introduction To Software Configuration Management
Introduction To Software Configuration ManagementIntroduction To Software Configuration Management
Introduction To Software Configuration Management
 
Continuous Integration & the Release Maturity Model
Continuous Integration & the Release Maturity Model Continuous Integration & the Release Maturity Model
Continuous Integration & the Release Maturity Model
 
Configuration management
Configuration managementConfiguration management
Configuration management
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systems
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practices
 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forge
 
Software configuration management
Software configuration managementSoftware configuration management
Software configuration management
 

Viewers also liked

Configuration Management in Software Engineering - SE29
Configuration Management in Software Engineering - SE29Configuration Management in Software Engineering - SE29
Configuration Management in Software Engineering - SE29
koolkampus
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
Evgeny Mandrikov
 
Software configuration management
Software configuration managementSoftware configuration management
Software configuration management
Shivani Garg
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)
Nishkarsh Gupta
 

Viewers also liked (12)

Code coverage
Code coverageCode coverage
Code coverage
 
SCM Process and smartBuild
SCM Process and smartBuildSCM Process and smartBuild
SCM Process and smartBuild
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices
 
Why Scm
Why ScmWhy Scm
Why Scm
 
ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
Configuration Management in Software Engineering - SE29
Configuration Management in Software Engineering - SE29Configuration Management in Software Engineering - SE29
Configuration Management in Software Engineering - SE29
 
Build And Automation
Build And AutomationBuild And Automation
Build And Automation
 
Code coverage
Code coverageCode coverage
Code coverage
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
 
Software configuration management
Software configuration managementSoftware configuration management
Software configuration management
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)
 

Similar to Fundamental of apache maven

Java build tools
Java build toolsJava build tools
Java build tools
Sujit Kumar
 

Similar to Fundamental of 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
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to 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
 

More from Rajesh Kumar

More from Rajesh Kumar (20)

Git and github fundamental
Git and github fundamentalGit and github fundamental
Git and github fundamental
 
Tools for quality matrix and kloc
Tools for quality matrix and klocTools for quality matrix and kloc
Tools for quality matrix and kloc
 
Cast vs sonar
Cast vs sonarCast vs sonar
Cast vs sonar
 
Cast vs sonar
Cast vs sonarCast vs sonar
Cast vs sonar
 
Testing in a glance
Testing in a glanceTesting in a glance
Testing in a glance
 
Rpm cheatbook
Rpm cheatbookRpm cheatbook
Rpm cheatbook
 
Scm process assessment guide
Scm process assessment guideScm process assessment guide
Scm process assessment guide
 
Cruise control
Cruise controlCruise control
Cruise control
 
Cloud computer
Cloud computerCloud computer
Cloud computer
 
Using Ant To Build J2 Ee Applications
Using Ant To Build J2 Ee ApplicationsUsing Ant To Build J2 Ee Applications
Using Ant To Build J2 Ee Applications
 
Scm With Mks Integrity
Scm With Mks IntegrityScm With Mks Integrity
Scm With Mks Integrity
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Introduction To Ant1
Introduction To  Ant1Introduction To  Ant1
Introduction To Ant1
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Process
ProcessProcess
Process
 
Oot
OotOot
Oot
 
Ood Post1
Ood Post1Ood Post1
Ood Post1
 
Ooa 1 Post
Ooa 1 PostOoa 1 Post
Ooa 1 Post
 
Ooa 2 Post1
Ooa 2 Post1Ooa 2 Post1
Ooa 2 Post1
 
Ocl
OclOcl
Ocl
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Fundamental of 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