SlideShare a Scribd company logo
1 of 8
ANT vs MAVEN
A Maven build follow a life cycle
- generate-resources
- compile
- test
- package
- Install
- deploy
- clean
Apache Ant
● Ant doesn’t have formal conventions like a common project directory
structure or default behavior. You have to tell Ant exactly where to find
the source and where to put the output. Informal conventions have
emerged over time, but they haven’t been codified into the product.
Apache Maven
● Maven has conventions. It knows where your source code is because
you followed the convention.
Apache ANT
● Ant is procedural
● Ant doesn’t have a lifecycle. You have to define goals and goal dependencies.
You have to attach a sequence of tasks to each goal manually.
Apache MAVEN
● Maven is declarative. All you had to do was create a pom.xml file and put your
source in the default directory. Maven took care of the rest.
● Maven has a lifecycle which was invoked when you executed mvn install. This
command told Maven to execute a series of sequential lifecycle phases until it
reached the install lifecycle phase. As a side-effect of this journey through the
lifecycle, Maven executed a number of default plugin goals which did things like
compile and create a JAR.
Maven's strengths:
● Enforces a standardized project layout. This saves time
getting new people working on the project.
● Provides automatic resolution of dependencies.
● Promotes the concept of a resource repository.
● Can create complex products with minimal direction.
Ant's strengths
● Flexibility in project organization.
● Know what happens in the build.xml
● Ant's weaknesses are that you can't get automatic
resource resolution with basic Ant (although you can use
Ivy), you have to code your own rules in detail for each
project, and the build environment is only as portable as
the person who designed the build.xml forced it to be.
Maven Drawback
● Surefire Tests
● Space 2/3rd extra
Maven is great if:
● You are working with many "creative" developers. It will be hard to
establish a defined project structure etc. without tool support.
● The developers are religious about their IDE and are using IntelliJ,
NetBeans and Eclipse at the same time.
● You are building a product-like application. You will have to manage
different versions and branches with their dependencies.
● You project consists of several teams which work on dependent
modules. These modules have to be composed to the application
regularly.
● You plan to use checkstyle, pmd, generate a project website etc. It's
easy with Maven.
Choose Ant for:
● "Situational Software" which has to be developed quickly (in a few weeks / months).
● Projects with external dependencies which are working with "cutting edge" libraries.
There is no need for finer grained dependency management.
● NetBeans projects :-). They come with predefined Ant scripts which even work
perfectly with Hudson. Just check everything into svn and let hudson check it out...
● Legacy projects which do not fit the Maven conventions very well. Violating Maven
conventions may become a hassle.
● Projects without explicit requirements for modularization. The deployable output will
consist of only a few archives.

More Related Content

What's hot

Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 

What's hot (20)

Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!
 
Development Tools - Maven
Development Tools - MavenDevelopment Tools - Maven
Development Tools - Maven
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Maven 2 Introduction
Maven 2 IntroductionMaven 2 Introduction
Maven 2 Introduction
 
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
 
Spring boot
Spring bootSpring boot
Spring boot
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Maven
MavenMaven
Maven
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 
Springboot introduction
Springboot introductionSpringboot introduction
Springboot introduction
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
 
Apache Maven In 10 Slides
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 Slides
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Maven
Maven Maven
Maven
 

Viewers also liked (20)

Apache ant
Apache antApache ant
Apache ant
 
ANT
ANTANT
ANT
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 
GdG DevFestMed 2016 - 06/11/2016
GdG DevFestMed 2016 - 06/11/2016GdG DevFestMed 2016 - 06/11/2016
GdG DevFestMed 2016 - 06/11/2016
 
Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
 
Ant
AntAnt
Ant
 
Basics of ANT
Basics of ANTBasics of ANT
Basics of ANT
 
Continuos integration patterns
Continuos integration patternsContinuos integration patterns
Continuos integration patterns
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Ant - Another Neat Tool
Ant - Another Neat ToolAnt - Another Neat Tool
Ant - Another Neat Tool
 
docker installation and basics
docker installation and basicsdocker installation and basics
docker installation and basics
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Apache ANT
Apache ANTApache ANT
Apache ANT
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 

Similar to Apache ANT vs Apache Maven

Java build tools
Java build toolsJava build tools
Java build tools
Sujit Kumar
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 

Similar to Apache ANT vs 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
 
Build tool
Build toolBuild tool
Build tool
 
Java build tools
Java build toolsJava build tools
Java build tools
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-Tools
 
What is maven
What is mavenWhat is maven
What is maven
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Maven basics
Maven basicsMaven basics
Maven basics
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Apache maven
Apache mavenApache maven
Apache maven
 
Fundamental of apache maven
Fundamental of apache mavenFundamental of apache maven
Fundamental of apache maven
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Recently uploaded (20)

WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 

Apache ANT vs Apache Maven

  • 1. ANT vs MAVEN A Maven build follow a life cycle - generate-resources - compile - test - package - Install - deploy - clean
  • 2. Apache Ant ● Ant doesn’t have formal conventions like a common project directory structure or default behavior. You have to tell Ant exactly where to find the source and where to put the output. Informal conventions have emerged over time, but they haven’t been codified into the product. Apache Maven ● Maven has conventions. It knows where your source code is because you followed the convention.
  • 3. Apache ANT ● Ant is procedural ● Ant doesn’t have a lifecycle. You have to define goals and goal dependencies. You have to attach a sequence of tasks to each goal manually. Apache MAVEN ● Maven is declarative. All you had to do was create a pom.xml file and put your source in the default directory. Maven took care of the rest. ● Maven has a lifecycle which was invoked when you executed mvn install. This command told Maven to execute a series of sequential lifecycle phases until it reached the install lifecycle phase. As a side-effect of this journey through the lifecycle, Maven executed a number of default plugin goals which did things like compile and create a JAR.
  • 4. Maven's strengths: ● Enforces a standardized project layout. This saves time getting new people working on the project. ● Provides automatic resolution of dependencies. ● Promotes the concept of a resource repository. ● Can create complex products with minimal direction.
  • 5. Ant's strengths ● Flexibility in project organization. ● Know what happens in the build.xml ● Ant's weaknesses are that you can't get automatic resource resolution with basic Ant (although you can use Ivy), you have to code your own rules in detail for each project, and the build environment is only as portable as the person who designed the build.xml forced it to be.
  • 6. Maven Drawback ● Surefire Tests ● Space 2/3rd extra
  • 7. Maven is great if: ● You are working with many "creative" developers. It will be hard to establish a defined project structure etc. without tool support. ● The developers are religious about their IDE and are using IntelliJ, NetBeans and Eclipse at the same time. ● You are building a product-like application. You will have to manage different versions and branches with their dependencies. ● You project consists of several teams which work on dependent modules. These modules have to be composed to the application regularly. ● You plan to use checkstyle, pmd, generate a project website etc. It's easy with Maven.
  • 8. Choose Ant for: ● "Situational Software" which has to be developed quickly (in a few weeks / months). ● Projects with external dependencies which are working with "cutting edge" libraries. There is no need for finer grained dependency management. ● NetBeans projects :-). They come with predefined Ant scripts which even work perfectly with Hudson. Just check everything into svn and let hudson check it out... ● Legacy projects which do not fit the Maven conventions very well. Violating Maven conventions may become a hassle. ● Projects without explicit requirements for modularization. The deployable output will consist of only a few archives.