SlideShare a Scribd company logo
Java Build tools : Ant and Maven
 Ant was the first among “modern” build tools.
 It was released in 2000 and in a short period of time became the most popular build
tool for Java projects.
 It is very easy to learn thus allowing anyone to start using it without any special
preparation.
 It is based on procedural programming idea.
 Maven was released in 2004. Its goal was to improve upon some of the problems
developers were facing when using Ant.
© Sun Technologies Inc. 1
© Sun Technologies Inc.
Apache Ant features
2
 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.
 Ant is procedural.
You have to tell Ant exactly what to do and when to do it.
© Sun Technologies Inc.
Getting started with Ant
 Download and unzip the latest version of ANT.
 You should have installed Java and set up path of JAVA_HOME.
 Set PATH environment variable by appending path of ANT.
 Build a basic ANT script and run from command prompt.
3
© Sun Technologies Inc.
Running and checking whether Ant is installed in the system .
4
© Sun Technologies Inc. 5
Writing build.xml file in Notepad
© Sun Technologies Inc. 6
Running build.xml file in command prompt
© Sun Technologies Inc. 7
Running hello.xml file
© Sun Technologies Inc.
Executing hello.xml in command prompt
8
© Sun Technologies Inc.
Executing hello.xml in command prompt
9
© Sun Technologies Inc.
Writing Second target in hello.xml
10
© Sun Technologies Inc.
Executing Second target of hello.xml in command prompt
11
© Sun Technologies Inc.
Executing build.xml in eclipse
12
© Sun Technologies Inc.
Executing build.xml in eclipse
13
© Sun Technologies Inc.
Executing run target
14
© Sun Technologies Inc.
Executing run target in eclipse
15
© Sun Technologies Inc.
Executing second run target in eclipse
16
© Sun Technologies Inc.
Sample Ant build.xml
17
© Sun Technologies Inc.
Apache Maven
18
Apache Maven is a open source build testing tool. It will check the
compilation issue in entire framework based on the concept of a
project object model (POM), Maven can manage project's build,
reporting and documentation.
© Sun Technologies Inc.
Apache Maven features
19
 Maven has conventions.
It knows where your source code is because you followed the convention. Maven’s
Compiler plugin put the bytecode in target/classes, and it produces a JAR file in
target.
 Maven is declarative.
All you need to do is create a pom.xml file and put your source in the default
directory. Maven will take care of the rest.
© Sun Technologies Inc.
Apache Maven Installation
20
 Download latest version of maven and unzip the folder.
 Copy the bin path.
 Go to environment variables find path variable and edit and paste the bin path.
 Create a new variable as Maven_Home and paste the path of Maven.
 And the Java_Home should contain path of the java.
 Go to command prompt and check whether maven is installed or not by typing
mvn –version.
© Sun Technologies Inc.
Apache Maven Installation
21
© Sun Technologies Inc.
Downloading jars from command prompt
22
© Sun Technologies Inc.
Apache Maven Installation
23
First we need to add all the dependencies to pom.xml file.
Then run,
 mvn compile is a command to get dependencies jar from internet
It will download Jars from internet based on pom.xml file.
 mvn install
Command for executing test script from command prompt.
© Sun Technologies Inc.
Apache Maven with eclipse
24
 Install maven plugin in eclipse
Help -> install new software
install the plugin m2e - Maven Integration for Eclipse
 Install java
© Sun Technologies Inc.
Apache Maven with eclipse
25
© Sun Technologies Inc.
Apache Maven with eclipse
26
© Sun Technologies Inc.
Apache Maven with eclipse
27
© Sun Technologies Inc.
Apache Maven with eclipse
28
© Sun Technologies Inc.
Apache Ant VS Maven
29
ANT,
doesn't have formal conventions like a common project directory structure,
you have to tell Ant exactly where to find the source and where to put the
output.
is procedural, you have to tell Ant exactly what to do and when to do it. You
had to tell it to compile, then copy, then compress.
doesn't have a lifecycle, you had to define goals and goal dependencies. You
had to attach a sequence of tasks to each goal/target manually.
© Sun Technologies Inc.
Apache Ant VS Maven
30
Maven,
 has conventions, it already knew where your source code was because you followed
the convention. It put the bytecode in target/classes, and it produced a JAR file in
target.
 is declarative. All you need to do is create a pom.xml file and put your source in the
default directory. Maven will take care of the rest.
© Sun Technologies Inc. 31
Thank you

More Related Content

PPTX
PPTX
Silk Performer Presentation v1
PPT
Getting Started with Apache Jmeter
PPTX
"Introduction to JMeter" @ CPTM 3rd Session
PDF
Automation - Apache JMeter
PDF
This Is How We Test Our Performance With JMeter
PDF
JMeter vs LoadRunner | Edureka
PDF
Load Testing Tools | Testbytes
Silk Performer Presentation v1
Getting Started with Apache Jmeter
"Introduction to JMeter" @ CPTM 3rd Session
Automation - Apache JMeter
This Is How We Test Our Performance With JMeter
JMeter vs LoadRunner | Edureka
Load Testing Tools | Testbytes

What's hot (20)

PPTX
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
PPTX
PERFORMANCE TESTING USING LOAD RUNNER
PPTX
Stress driven development
PDF
JMeter JMX Script Creation via BlazeMeter
PPT
Wap tpresentation (Load testing Tool )
PPTX
Presentation on Apache Jmeter
PPTX
Introduction to jmeter & how to view jmeter Test Result in Real-Time
PDF
Load Testing with JMeter
PPTX
Open source load testing
PPTX
PPTX
Introduction to GOCD - Amulya Sharma
PPTX
Load runner & win runner
PPTX
Open Source Load Testing: JMeter, Gatling and Taurus
PPT
Load Test Drupal Site Using JMeter and Amazon AWS
PDF
JMeter - Performance testing your webapp
PPT
Performance testing using hp load runner
PPTX
JMeter workshop
PPTX
How to Get Automatic Analysis for Load Test Results
PPTX
Load testing a website through JMETER
PPTX
Jmeter load testing
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
PERFORMANCE TESTING USING LOAD RUNNER
Stress driven development
JMeter JMX Script Creation via BlazeMeter
Wap tpresentation (Load testing Tool )
Presentation on Apache Jmeter
Introduction to jmeter & how to view jmeter Test Result in Real-Time
Load Testing with JMeter
Open source load testing
Introduction to GOCD - Amulya Sharma
Load runner & win runner
Open Source Load Testing: JMeter, Gatling and Taurus
Load Test Drupal Site Using JMeter and Amazon AWS
JMeter - Performance testing your webapp
Performance testing using hp load runner
JMeter workshop
How to Get Automatic Analysis for Load Test Results
Load testing a website through JMETER
Jmeter load testing
Ad

Viewers also liked (20)

PPTX
PPTX
Path Testing
PPTX
Selenium web driver
PPTX
An introduction to Maven
PPT
Demystifying Maven
PPTX
PPT
Selenium
PPTX
Javascript
PDF
Automated Deployment with Maven - going the whole nine yards
PPTX
HTML, CSS and Java Scripts Basics
PPT
Maven basic concept
DOCX
A Case Study of Using Selenium IDE and WebDriver_Word Doc
PDF
Maven 3 / Tycho
PDF
Hands On with Maven
PPT
Selenium
PDF
Hibernate 3
PDF
Concurrency and Multithreading Demistified - Reversim Summit 2014
PDF
Java Builds with Maven and Ant
PPTX
Version Management in Maven
PPT
Selenium
Path Testing
Selenium web driver
An introduction to Maven
Demystifying Maven
Selenium
Javascript
Automated Deployment with Maven - going the whole nine yards
HTML, CSS and Java Scripts Basics
Maven basic concept
A Case Study of Using Selenium IDE and WebDriver_Word Doc
Maven 3 / Tycho
Hands On with Maven
Selenium
Hibernate 3
Concurrency and Multithreading Demistified - Reversim Summit 2014
Java Builds with Maven and Ant
Version Management in Maven
Selenium
Ad

Similar to Maven and ANT (20)

PPTX
Java build tools
PPT
Apache ANT vs Apache Maven
PPT
Build tool
PPT
PPT
software technology benchmarking
PDF
SE2018_Lec-22_-Continuous-Integration-Tools
PPTX
Apache ant
PDF
Mavennotes.pdf
PPTX
An Introduction to Maven
PPTX
Ci jenkins maven svn
PPTX
Build Tools & Maven
PPTX
Introduction to Maven for beginners and DevOps
PPT
Ant - Another Neat Tool
PPT
Ant - Another Neat Tool
PPT
Apache Ant
PPTX
Apache Ant
PPTX
Apache Ant
PPT
Apache Ant
PPTX
Maven part 1
Java build tools
Apache ANT vs Apache Maven
Build tool
software technology benchmarking
SE2018_Lec-22_-Continuous-Integration-Tools
Apache ant
Mavennotes.pdf
An Introduction to Maven
Ci jenkins maven svn
Build Tools & Maven
Introduction to Maven for beginners and DevOps
Ant - Another Neat Tool
Ant - Another Neat Tool
Apache Ant
Apache Ant
Apache Ant
Apache Ant
Maven part 1

More from Sun Technlogies (10)

PPTX
HyperText Markup Language - HTML
PPTX
Extended Finite State Machine - EFSM
PPTX
Cascading Style Sheets - CSS
PPTX
Core java
PPTX
Automation Testing
PPTX
PPTX
PPTX
Mobile Application Testing
PPTX
Array and functions
PPTX
HyperText Markup Language - HTML
Extended Finite State Machine - EFSM
Cascading Style Sheets - CSS
Core java
Automation Testing
Mobile Application Testing
Array and functions

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
history of c programming in notes for students .pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administration Chapter 2
PPT
Introduction Database Management System for Course Database
PDF
Digital Strategies for Manufacturing Companies
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Transform Your Business with a Software ERP System
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Odoo POS Development Services by CandidRoot Solutions
Navsoft: AI-Powered Business Solutions & Custom Software Development
How Creative Agencies Leverage Project Management Software.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
history of c programming in notes for students .pptx
ISO 45001 Occupational Health and Safety Management System
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administration Chapter 2
Introduction Database Management System for Course Database
Digital Strategies for Manufacturing Companies
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
Online Work Permit System for Fast Permit Processing
Transform Your Business with a Software ERP System
Design an Analysis of Algorithms I-SECS-1021-03
Odoo POS Development Services by CandidRoot Solutions

Maven and ANT

  • 1. Java Build tools : Ant and Maven  Ant was the first among “modern” build tools.  It was released in 2000 and in a short period of time became the most popular build tool for Java projects.  It is very easy to learn thus allowing anyone to start using it without any special preparation.  It is based on procedural programming idea.  Maven was released in 2004. Its goal was to improve upon some of the problems developers were facing when using Ant. © Sun Technologies Inc. 1
  • 2. © Sun Technologies Inc. Apache Ant features 2  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.  Ant is procedural. You have to tell Ant exactly what to do and when to do it.
  • 3. © Sun Technologies Inc. Getting started with Ant  Download and unzip the latest version of ANT.  You should have installed Java and set up path of JAVA_HOME.  Set PATH environment variable by appending path of ANT.  Build a basic ANT script and run from command prompt. 3
  • 4. © Sun Technologies Inc. Running and checking whether Ant is installed in the system . 4
  • 5. © Sun Technologies Inc. 5 Writing build.xml file in Notepad
  • 6. © Sun Technologies Inc. 6 Running build.xml file in command prompt
  • 7. © Sun Technologies Inc. 7 Running hello.xml file
  • 8. © Sun Technologies Inc. Executing hello.xml in command prompt 8
  • 9. © Sun Technologies Inc. Executing hello.xml in command prompt 9
  • 10. © Sun Technologies Inc. Writing Second target in hello.xml 10
  • 11. © Sun Technologies Inc. Executing Second target of hello.xml in command prompt 11
  • 12. © Sun Technologies Inc. Executing build.xml in eclipse 12
  • 13. © Sun Technologies Inc. Executing build.xml in eclipse 13
  • 14. © Sun Technologies Inc. Executing run target 14
  • 15. © Sun Technologies Inc. Executing run target in eclipse 15
  • 16. © Sun Technologies Inc. Executing second run target in eclipse 16
  • 17. © Sun Technologies Inc. Sample Ant build.xml 17
  • 18. © Sun Technologies Inc. Apache Maven 18 Apache Maven is a open source build testing tool. It will check the compilation issue in entire framework based on the concept of a project object model (POM), Maven can manage project's build, reporting and documentation.
  • 19. © Sun Technologies Inc. Apache Maven features 19  Maven has conventions. It knows where your source code is because you followed the convention. Maven’s Compiler plugin put the bytecode in target/classes, and it produces a JAR file in target.  Maven is declarative. All you need to do is create a pom.xml file and put your source in the default directory. Maven will take care of the rest.
  • 20. © Sun Technologies Inc. Apache Maven Installation 20  Download latest version of maven and unzip the folder.  Copy the bin path.  Go to environment variables find path variable and edit and paste the bin path.  Create a new variable as Maven_Home and paste the path of Maven.  And the Java_Home should contain path of the java.  Go to command prompt and check whether maven is installed or not by typing mvn –version.
  • 21. © Sun Technologies Inc. Apache Maven Installation 21
  • 22. © Sun Technologies Inc. Downloading jars from command prompt 22
  • 23. © Sun Technologies Inc. Apache Maven Installation 23 First we need to add all the dependencies to pom.xml file. Then run,  mvn compile is a command to get dependencies jar from internet It will download Jars from internet based on pom.xml file.  mvn install Command for executing test script from command prompt.
  • 24. © Sun Technologies Inc. Apache Maven with eclipse 24  Install maven plugin in eclipse Help -> install new software install the plugin m2e - Maven Integration for Eclipse  Install java
  • 25. © Sun Technologies Inc. Apache Maven with eclipse 25
  • 26. © Sun Technologies Inc. Apache Maven with eclipse 26
  • 27. © Sun Technologies Inc. Apache Maven with eclipse 27
  • 28. © Sun Technologies Inc. Apache Maven with eclipse 28
  • 29. © Sun Technologies Inc. Apache Ant VS Maven 29 ANT, doesn't have formal conventions like a common project directory structure, you have to tell Ant exactly where to find the source and where to put the output. is procedural, you have to tell Ant exactly what to do and when to do it. You had to tell it to compile, then copy, then compress. doesn't have a lifecycle, you had to define goals and goal dependencies. You had to attach a sequence of tasks to each goal/target manually.
  • 30. © Sun Technologies Inc. Apache Ant VS Maven 30 Maven,  has conventions, it already knew where your source code was because you followed the convention. It put the bytecode in target/classes, and it produced a JAR file in target.  is declarative. All you need to do is create a pom.xml file and put your source in the default directory. Maven will take care of the rest.
  • 31. © Sun Technologies Inc. 31 Thank you