SlideShare a Scribd company logo
Java Build Tools
 Desired Features
            Ant
            Maven
            Ant vs Maven
CONTENTS
Whats expected of build

                          •   Versioning
                          •   Compile Java code, build jars
                          •   Execute tests and report results
                          •   Run quality-check tools (PMD, Findbugs..)
                          •   Build vs. deploy vs. release
                          •   Cross-platform
                          •   IDE Support
                          •   Documentation / Support
tools
 Java-based build tool
            Mature
            Stable
            Rich library of tasks
WHY ANT!
   Ant With Convention Over Configuration
                Dependency Management
                Uniform Build System.
                Project Structure.
                Coherent site of project information along-with
                 Internationalization.
                Release management and distribution publication.
WHY MAVEN!
Concerns to build a project


                               Project directory structure
                               Directory naming conventions
                               The build output
   Contains project information and configuration details used to
                           build the project
                           ◦   – Project dependencies
                           ◦   – Commands (goals) that can be executed
Project Object Model
                           ◦   – Plugins
                           ◦   – Metadata
                          The minimum requirement for a POM are the following:
                           ◦   project root
                           ◦   modelVersion - should be set to 4.0.0
                           ◦   groupId - the id of the project's group.
                           ◦   artifactId - the id of the artifact (project)
                           ◦   version - the version of the artifact under the specified group
                           e.g.:
                           ◦   <modelVersion>4.0.0</modelVersion>
                           ◦   <groupId>com.cisco.ccw.config</groupId>
                           ◦   <artifactId>ConfigService</artifactId>
                           ◦   <packaging>jar</packaging>
                           ◦   <version>7.0</version>
                           ◦   <name>CCW Config Services</name>
                           ◦   <url>http://www.cisco.com</url>
Java Build Tools
Project inheritance
Project aggregation
Build Lifecycle and Phases
   Most important default phases:
    ◦ Validate
    ◦ Compile
    ◦ Test
    ◦ Package
    ◦ Install
    ◦ Deploy

   Some common phases not default:
    ◦ Clean
    ◦ Site
Dependency scope
   Compile: Available in all classpaths (default)
   Provided: The JDK or the container provides it
   Runtime: Only required for execution, not for
    compilation
   Test: Only required for testing, not for normal use (not
    deployed)
   System: You provide it locally, not looked up in a repo
         <dependency>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.4</version>
         <scope>compile</scope>
         </dependency>
FEATURES                                                    ANT                MAVEN
               Dependency Management

               Versioning                                                  Manually defined

               Compile Java code, build jars

               Execute tests, report results, fail build on failed tests

               Build vs. deploy vs. release                                Manually defined

               Full control when needed                                    Custom XML         Write custom
                                                                           “scripts”          plugin or
                                                                                              embedded Ant
                                                                                              script
               Documentation / Support                                     Excellent          Growing but still
Ant vs Maven




                                                                                              inconsistent
               Run quality check tools (PMD, FindBugs, JavaDoc)            3rd party task     3rd party plugins
                                                                           libraries
               File generation (XmlBeans, XSL, Velocity, AspectJ)          3rd party task     3rd party plugins
                                                                           libraries
               Generating the Site
Reference
   http://en.wikipedia.org/wiki/List_of_build_automation_softwar
    e
   http://maven.apache.org/maven-features.html

More Related Content

What's hot (20)

PPTX
Apache Maven
Vít Kotačka
 
PDF
Java is evolving rapidly: Maven helps you staying on track
Arnaud Héritier
 
PDF
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
PPSX
RequireJS
Tim Doherty
 
PDF
Maven tutorial
James Cellini
 
PDF
maven build certificaton
Vskills
 
PPTX
Netbeans
acosdt
 
PDF
Software Testen mit Visual Studio Lab Management
Nico Orschel
 
PDF
As7 web services - JUG Milan April 2012
alepalin
 
PPTX
Jenkins
penetration Tester
 
PDF
Busy developer-html5-javaee7
Geertjan Wielenga
 
PDF
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
PDF
Webdriver.io
LinkMe Srl
 
PPTX
Intro to Angular.js & Zend2 for Front-End Web Applications
TECKpert, Hubdin
 
PPTX
Gradle,the new build system for android
zhang ghui
 
PPTX
Development of automated tests for ext js based web sites
ISsoft
 
PDF
One step in the future: CSS variables
Giacomo Zinetti
 
DOC
Project bcool standards document
Ravi Tadwalkar
 
PPTX
Micronaut: A new way to build microservices
Luram Archanjo
 
PDF
Java server face tutorial
Abderrahman Bachiri Taoufiq
 
Apache Maven
Vít Kotačka
 
Java is evolving rapidly: Maven helps you staying on track
Arnaud Héritier
 
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
RequireJS
Tim Doherty
 
Maven tutorial
James Cellini
 
maven build certificaton
Vskills
 
Netbeans
acosdt
 
Software Testen mit Visual Studio Lab Management
Nico Orschel
 
As7 web services - JUG Milan April 2012
alepalin
 
Busy developer-html5-javaee7
Geertjan Wielenga
 
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
Webdriver.io
LinkMe Srl
 
Intro to Angular.js & Zend2 for Front-End Web Applications
TECKpert, Hubdin
 
Gradle,the new build system for android
zhang ghui
 
Development of automated tests for ext js based web sites
ISsoft
 
One step in the future: CSS variables
Giacomo Zinetti
 
Project bcool standards document
Ravi Tadwalkar
 
Micronaut: A new way to build microservices
Luram Archanjo
 
Java server face tutorial
Abderrahman Bachiri Taoufiq
 

Viewers also liked (20)

PDF
Ant_quick_guide
ducquoc_vn
 
PDF
Zen and-the-art-of-build-script-maintenance-skillsmatter
Skills Matter
 
PPTX
Jvm a brief introduction
Artem Shoobovych
 
PDF
Architecting your Frontend
Ruben Teijeiro
 
PDF
Angular.js
GDG Cali
 
PPTX
Gradle 2.Write once, builde everywhere
Strannik_2013
 
PDF
Make Your Builds More Groovy
Paul King
 
PPTX
Apache maven 2 overview
Return on Intelligence
 
KEY
4장. Class Loader
김 한도
 
PPTX
Tutorial to develop build files using ANT
ravireddy76
 
PPTX
Apache maven 2 overview
Return on Intelligence
 
PPTX
Apache ant
koniik
 
PDF
Java Classloaders
Prateek Jain
 
PDF
Java Build Tool course in 2011
Ching Yi Chan
 
ZIP
Automated Frontend Testing
Neil Crosby
 
PPT
Apache Ant
hussulinux
 
PDF
Front-End Testing: Demystified
Seth McLaughlin
 
PPT
Apache Ant
Rajesh Kumar
 
KEY
Erlang vs. Java
Artan Cami
 
PDF
Manen Ant SVN
Sriskandarajah Suhothayan
 
Ant_quick_guide
ducquoc_vn
 
Zen and-the-art-of-build-script-maintenance-skillsmatter
Skills Matter
 
Jvm a brief introduction
Artem Shoobovych
 
Architecting your Frontend
Ruben Teijeiro
 
Angular.js
GDG Cali
 
Gradle 2.Write once, builde everywhere
Strannik_2013
 
Make Your Builds More Groovy
Paul King
 
Apache maven 2 overview
Return on Intelligence
 
4장. Class Loader
김 한도
 
Tutorial to develop build files using ANT
ravireddy76
 
Apache maven 2 overview
Return on Intelligence
 
Apache ant
koniik
 
Java Classloaders
Prateek Jain
 
Java Build Tool course in 2011
Ching Yi Chan
 
Automated Frontend Testing
Neil Crosby
 
Apache Ant
hussulinux
 
Front-End Testing: Demystified
Seth McLaughlin
 
Apache Ant
Rajesh Kumar
 
Erlang vs. Java
Artan Cami
 
Ad

Similar to Java Build Tools (20)

PDF
Maven 3 Overview
Mike Ensor
 
PDF
Practical maven-slides 2
Will Iverson
 
PDF
Hands On with Maven
Sid Anand
 
PDF
Maven: from Scratch to Production (.pdf)
Johan Mynhardt
 
PPTX
Ci jenkins maven svn
Ankur Goyal
 
PDF
Java Builds with Maven and Ant
David Noble
 
PDF
Apache Maven - eXo TN presentation
Arnaud Héritier
 
PPTX
An Introduction to Maven
Vadym Lotar
 
ODP
An Introduction to Maven Part 1
MD Sayem Ahmed
 
PDF
Apache Continuum Build, Test, and Release
elliando dias
 
PDF
Lorraine JUG (1st June, 2010) - Maven
Arnaud Héritier
 
PPT
Presentation 1 open source tools in continuous integration environment v1.0
Jasmine Conseil
 
PDF
Riviera JUG (20th April, 2010) - Maven
Arnaud Héritier
 
PDF
Lausanne Jug (08th April, 2010) - Maven
Arnaud Héritier
 
PDF
Maven2交流
ChangQi Lin
 
PPTX
How maven makes your development group look like a bunch of professionals.
Fazreil Amreen Abdul Jalil
 
PPTX
Apache Maven
venkatraghavang
 
PDF
Apache Maven at GenevaJUG by Arnaud Héritier
GenevaJUG
 
PDF
Introduction in Apache Maven2
Heiko Scherrer
 
PPTX
Continuous Deployment Pipeline with maven
Alan Parkinson
 
Maven 3 Overview
Mike Ensor
 
Practical maven-slides 2
Will Iverson
 
Hands On with Maven
Sid Anand
 
Maven: from Scratch to Production (.pdf)
Johan Mynhardt
 
Ci jenkins maven svn
Ankur Goyal
 
Java Builds with Maven and Ant
David Noble
 
Apache Maven - eXo TN presentation
Arnaud Héritier
 
An Introduction to Maven
Vadym Lotar
 
An Introduction to Maven Part 1
MD Sayem Ahmed
 
Apache Continuum Build, Test, and Release
elliando dias
 
Lorraine JUG (1st June, 2010) - Maven
Arnaud Héritier
 
Presentation 1 open source tools in continuous integration environment v1.0
Jasmine Conseil
 
Riviera JUG (20th April, 2010) - Maven
Arnaud Héritier
 
Lausanne Jug (08th April, 2010) - Maven
Arnaud Héritier
 
Maven2交流
ChangQi Lin
 
How maven makes your development group look like a bunch of professionals.
Fazreil Amreen Abdul Jalil
 
Apache Maven
venkatraghavang
 
Apache Maven at GenevaJUG by Arnaud Héritier
GenevaJUG
 
Introduction in Apache Maven2
Heiko Scherrer
 
Continuous Deployment Pipeline with maven
Alan Parkinson
 
Ad

Java Build Tools

  • 2.  Desired Features  Ant  Maven  Ant vs Maven CONTENTS
  • 3. Whats expected of build • Versioning • Compile Java code, build jars • Execute tests and report results • Run quality-check tools (PMD, Findbugs..) • Build vs. deploy vs. release • Cross-platform • IDE Support • Documentation / Support tools
  • 4.  Java-based build tool  Mature  Stable  Rich library of tasks WHY ANT!
  • 5. Ant With Convention Over Configuration  Dependency Management  Uniform Build System.  Project Structure.  Coherent site of project information along-with Internationalization.  Release management and distribution publication. WHY MAVEN!
  • 6. Concerns to build a project  Project directory structure  Directory naming conventions  The build output
  • 7. Contains project information and configuration details used to build the project ◦ – Project dependencies ◦ – Commands (goals) that can be executed Project Object Model ◦ – Plugins ◦ – Metadata  The minimum requirement for a POM are the following: ◦ project root ◦ modelVersion - should be set to 4.0.0 ◦ groupId - the id of the project's group. ◦ artifactId - the id of the artifact (project) ◦ version - the version of the artifact under the specified group e.g.: ◦ <modelVersion>4.0.0</modelVersion> ◦ <groupId>com.cisco.ccw.config</groupId> ◦ <artifactId>ConfigService</artifactId> ◦ <packaging>jar</packaging> ◦ <version>7.0</version> ◦ <name>CCW Config Services</name> ◦ <url>http://www.cisco.com</url>
  • 11. Build Lifecycle and Phases  Most important default phases: ◦ Validate ◦ Compile ◦ Test ◦ Package ◦ Install ◦ Deploy  Some common phases not default: ◦ Clean ◦ Site
  • 12. Dependency scope  Compile: Available in all classpaths (default)  Provided: The JDK or the container provides it  Runtime: Only required for execution, not for compilation  Test: Only required for testing, not for normal use (not deployed)  System: You provide it locally, not looked up in a repo  <dependency>  <groupId>commons-logging</groupId>  <artifactId>commons-logging</artifactId>  <version>1.4</version>  <scope>compile</scope>  </dependency>
  • 13. FEATURES ANT MAVEN Dependency Management Versioning Manually defined Compile Java code, build jars Execute tests, report results, fail build on failed tests Build vs. deploy vs. release Manually defined Full control when needed Custom XML Write custom “scripts” plugin or embedded Ant script Documentation / Support Excellent Growing but still Ant vs Maven inconsistent Run quality check tools (PMD, FindBugs, JavaDoc) 3rd party task 3rd party plugins libraries File generation (XmlBeans, XSL, Velocity, AspectJ) 3rd party task 3rd party plugins libraries Generating the Site
  • 14. Reference  http://en.wikipedia.org/wiki/List_of_build_automation_softwar e  http://maven.apache.org/maven-features.html