SlideShare a Scribd company logo
Build Tools & Maven
What do build tools do?
• Automate the process of turning the source code that you’ve written
to the end-product to be run by the user.
What do build tools do?
• Package your code
• (e.g. Compiling source code into binary code; packaging binary code)
• Deployment
• (e.g. putting the new programme on your web server or production systems;
Uploading the new programme for users to download)
• Tests
• (e.g. Running any unit/system tests we’ve written; Check that the code meets
standards)
• Integrate with other tools
• (e.g. Generate documentation from the code you’ve written; Kick off other
build tools)
Every environment/build tool is different
• Javascript
• Gulp, Grunt, Brocolli
• C#/.NET
• Nant, MSBuild
• Java/JVM
• Ant, Maven, Gradle, SBT, Leiningen
Maven
• Began production in 2002
• V1.0 released 2004;
• Maven 2 was a significant change (i.e. broke v1.0) and was released
very soon after in 2005
• Future mavens aim to be backward compatible, and was released in
2010.
Plugins
• Goal
• Like a task, i.e. “I want to do this thing now, please”
• e.g. “Run all my unit tests”
• Plugin
• A plugin is a collection of goals.
• E.g. “Maven Compiler Plugin” has “compiler:compile” and
“compiler:testCompile” – these can be run individually but don’t tend to be
(foreshadowing!)
• Some plugins are core to maven (e.g. “clean” or “surefire”) others have to be
imported.
• List of plugins: http://maven.apache.org/plugins/
POM.xml
• Project Object Model (pom.xml)
• Can contains lots of information:
• What the project is (e.g. name, version)
• What project you depend on (Super POM by default, but e.g. Forge POM)
• Dependencies
• Which plugins to use
• Variables (“properties”)
Lifecycle
• A “lifecycle” is a list of instructions that says “this is what I want to do
with this code”
• You will almost always use the default lifecycles (default, clean and site), but
can set up new ones.
• A lifecycle is made up of phases in order, and a phase is made up of
goals.
• To run a lifecycle, give it a phase in that lifecycle, and it will run
everything up until that phase.
Lifecycles: An Example
validate ensure all necessary information is available
compile compile the source code of the project
test unit test the source code using a suitable framework.
package package the code in its distributable format (e.g. JAR)
integration-test
deploy the package if necessary into an environment
where integration tests can be run
verify
run checks to verify the package is valid and meets
quality criteria
install install the package into the local repo
deploy project specific!
Back to home…
mvn clean install site –Dmaven.antrun.skip = true

More Related Content

PPTX
Build tools introduction
PPTX
PPTX
Maven ppt
PPT
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
PPTX
Ci jenkins maven svn
PPTX
Apache Maven
PDF
Jenkins
PPTX
Automated Testing Environment by Bugzilla, Testopia and Jenkins
Build tools introduction
Maven ppt
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Ci jenkins maven svn
Apache Maven
Jenkins
Automated Testing Environment by Bugzilla, Testopia and Jenkins

What's hot (20)

PDF
Introduction to Apache Maven
PDF
Hacking Jenkins
PDF
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
PPTX
Jenkins introduction
PPTX
Version Control and Continuous Integration
PPTX
Log management (elk) for spring boot application
PPTX
PPTX
Jenkins presentation
PDF
Let’s start Continuous Integration with jenkins
PPTX
Supermondays: Jenkins CI lightning talk
PDF
Continuous Integration with Maven for Android apps
PDF
Jenkins Pipelines
PPTX
Jenkins CI presentation
PPTX
Jenkins Pipeline 101 and TCI - presentation and workshop
PPTX
Session 2
PPTX
Session 2
PPTX
Introduction to jenkins
Introduction to Apache Maven
Hacking Jenkins
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Jenkins introduction
Version Control and Continuous Integration
Log management (elk) for spring boot application
Jenkins presentation
Let’s start Continuous Integration with jenkins
Supermondays: Jenkins CI lightning talk
Continuous Integration with Maven for Android apps
Jenkins Pipelines
Jenkins CI presentation
Jenkins Pipeline 101 and TCI - presentation and workshop
Session 2
Session 2
Introduction to jenkins
Ad

Similar to Build Tools & Maven (20)

PDF
Apache maven
PDF
Fundamental of apache maven
PPTX
PPTX
Embrace Maven
PPTX
Java build tools
ODP
Maven in Java EE project
PDF
Build Automation using Maven
PDF
Mavennotes.pdf
PDF
Introduction to maven, its configuration, lifecycle and relationship to JS world
PPTX
Maven
PDF
Intelligent Projects with Maven - DevFest Istanbul
PDF
BMO - Intelligent Projects with Maven
PPT
Introduction tomaven
PPTX
An Introduction to Maven
PPT
Maven Introduction
PDF
Java Builds with Maven and Ant
PPT
MAVEN
PPTX
(Re)-Introduction to Maven
Apache maven
Fundamental of apache maven
Embrace Maven
Java build tools
Maven in Java EE project
Build Automation using Maven
Mavennotes.pdf
Introduction to maven, its configuration, lifecycle and relationship to JS world
Maven
Intelligent Projects with Maven - DevFest Istanbul
BMO - Intelligent Projects with Maven
Introduction tomaven
An Introduction to Maven
Maven Introduction
Java Builds with Maven and Ant
MAVEN
(Re)-Introduction to Maven
Ad

More from David Simons (17)

PDF
Four Architectural Patterns
PDF
Data Modelling at Scale
PDF
Decoupled APIs through Microservices
PDF
Statistical Programming with JavaScript
PDF
Non-Functional Requirements
PDF
High quality Front-End
PDF
Bristol Uni - Use Cases of NoSQL
PDF
Choosing the Right Database
PDF
Choosing the right database
PDF
Graph Modelling
PDF
Graph theory in Practise
PDF
Decoupled APIs through microservices
PDF
TDD: What is it good for?
PDF
Domain Driven Design: A Precis
PDF
10 d bs in 30 minutes
PPTX
Using Clojure to Marry Neo4j and Open Democracy
PDF
Exploring Election Results with Neo4J
Four Architectural Patterns
Data Modelling at Scale
Decoupled APIs through Microservices
Statistical Programming with JavaScript
Non-Functional Requirements
High quality Front-End
Bristol Uni - Use Cases of NoSQL
Choosing the Right Database
Choosing the right database
Graph Modelling
Graph theory in Practise
Decoupled APIs through microservices
TDD: What is it good for?
Domain Driven Design: A Precis
10 d bs in 30 minutes
Using Clojure to Marry Neo4j and Open Democracy
Exploring Election Results with Neo4J

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
KodekX | Application Modernization Development
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Modernizing your data center with Dell and AMD
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
20250228 LYD VKU AI Blended-Learning.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
Modernizing your data center with Dell and AMD
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

Build Tools & Maven

  • 2. What do build tools do? • Automate the process of turning the source code that you’ve written to the end-product to be run by the user.
  • 3. What do build tools do? • Package your code • (e.g. Compiling source code into binary code; packaging binary code) • Deployment • (e.g. putting the new programme on your web server or production systems; Uploading the new programme for users to download) • Tests • (e.g. Running any unit/system tests we’ve written; Check that the code meets standards) • Integrate with other tools • (e.g. Generate documentation from the code you’ve written; Kick off other build tools)
  • 4. Every environment/build tool is different • Javascript • Gulp, Grunt, Brocolli • C#/.NET • Nant, MSBuild • Java/JVM • Ant, Maven, Gradle, SBT, Leiningen
  • 5. Maven • Began production in 2002 • V1.0 released 2004; • Maven 2 was a significant change (i.e. broke v1.0) and was released very soon after in 2005 • Future mavens aim to be backward compatible, and was released in 2010.
  • 6. Plugins • Goal • Like a task, i.e. “I want to do this thing now, please” • e.g. “Run all my unit tests” • Plugin • A plugin is a collection of goals. • E.g. “Maven Compiler Plugin” has “compiler:compile” and “compiler:testCompile” – these can be run individually but don’t tend to be (foreshadowing!) • Some plugins are core to maven (e.g. “clean” or “surefire”) others have to be imported. • List of plugins: http://maven.apache.org/plugins/
  • 7. POM.xml • Project Object Model (pom.xml) • Can contains lots of information: • What the project is (e.g. name, version) • What project you depend on (Super POM by default, but e.g. Forge POM) • Dependencies • Which plugins to use • Variables (“properties”)
  • 8. Lifecycle • A “lifecycle” is a list of instructions that says “this is what I want to do with this code” • You will almost always use the default lifecycles (default, clean and site), but can set up new ones. • A lifecycle is made up of phases in order, and a phase is made up of goals. • To run a lifecycle, give it a phase in that lifecycle, and it will run everything up until that phase.
  • 9. Lifecycles: An Example validate ensure all necessary information is available compile compile the source code of the project test unit test the source code using a suitable framework. package package the code in its distributable format (e.g. JAR) integration-test deploy the package if necessary into an environment where integration tests can be run verify run checks to verify the package is valid and meets quality criteria install install the package into the local repo deploy project specific!
  • 10. Back to home… mvn clean install site –Dmaven.antrun.skip = true