SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Java Build Tool
Comparison
Java Build Tool Comparison
• Desired Features
• The Contenders
• Ant + Ivy
• Maven
• Gradle
• Buildr
• Others
• Results Matrix
• Subjective Evaluation
• Which Would You Choose?
Desired Features
• Dependency management
• Versioning
• Compile Java code, build jars
• Execute tests and report results, fail build on failed tests
• Run quality-check tools (PMD, Findbugs, Checkstyles)
• File generation (XmlBeans, Xsl, Velocity, AspectJ)
• Property expansion / token substitution
• Build vs. deploy vs. release
• Full control when needed
• Cross-platform
• IDE Support
• Documentation / Support
Ant + Ivy
 Ant is ubiquitous Java-based build tool
Uses XML “script” files
 Ivy is a dependency manager
Artifact repository
Dependency resolution, including transitive
(Project A -> Hibernate -> Commons-
Collections)
Sync with external repositories
Ant + Ivy
 Module dependencies are declared in ivy.xml
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<info organisation=“org.hjug" module=“myModule"/>
<dependencies>
<dependency org="org.apache" name="ant" rev="1.7.0"/>
<dependency org="org.apache" name="axis" rev="1.2rc3"/>
<dependency org="org.junit" name="junit" rev="4.4"/>
</dependencies>
</ivy-module>
Ant + Ivy
 Add this to your Ant buildfile (build.xml)
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="pdk" default="default" basedir=".">
…
<!-- Ivy Taskdefs -->
<path id="ivy.lib.path">
<fileset dir="C:/java-tools/apache-ivy-2.0.0" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
classpathref="ivy.lib.path"/>
<!-- Reference Ivy settings -->
<ivy:settings file="${basedir}/../ivysettings.xml"/>
<target name="ivy.resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve pattern=“${lib.dir}/[conf]/[artifact].[ext]”/>
</target>
<target name="ivy.publish" description="--> publish artifacts to local repository">
<ivy:publish resolver=“local” pubrevision=“${version}”>
<artifacts pattern=“dist/[artifact].[ext]”/>
</ivy:publish>
</target>
Ant + Ivy
 Build steps defined and executed with Ant
 Dependencies managed with Ivy
 Ant targets to install, retrieve artifacts
from Ivy repository
Ant + Ivy
Image copied from http://ant.apache.org/ivy/history/2.0.0/principle.html
Maven
 Project is defined by POM (Project Object
Model)
 Projects can contain sub-projects (modules)
 Based on recommended project structure (e.g.
src/main/java, src/main/resources, src/test/java, …)
 Artifact-focused (i.e. What files does this build
produce?)
 Heavy emphasis on default configuration
Maven
 Build Lifecycle is defined as Phases, which
execute sequentially
1. Validate
2. Compile
3. Test
4. Package
5. Integration-test
6. Verify
7. Install
8. Deploy
Maven
 Each Phase can be made up of zero or more
Goals (tasks)
 Project-specific configuration involves binding
specific goals to specific phases (beyond the default
settings)
 Extensible plugin system (called Mojos)
 Java-based or Ant-based
 Comprehensive set of third-party plugins available
Gradle
 Built on top of Ant + Ivy
 Build DSL written in Groovy
 Uses Groovy AntBuilder
ant.compile, ant.jar
 Plugins define common tasks to build
different types of projects
java, groovy, war, …
Gradle
 Assumes Maven conventions for file
locations (drop-in replacement for Maven)
Can be altered with the convention object
 Can use existing Maven or Ivy
repositories
Buildr
 Built on Ruby
Rake is similar to Ant (Ruby Make)
RubyGems is similar to rpm (package
manager, handles dependencies)
Build script written in Ruby (internal DSL)
Buildr
 Pre-defined tasks
 clean
 compile
 build
 upload
 install
 javadoc
 package
 test
 uninstall
Buildr
 Assumes Maven conventions for file
locations (drop-in replacement for Maven)
Can be altered
 Can use existing Maven repositories
Others
 Gant
 Rake
 EasyAnt
 Custom ?
Results Matrix
Desired Feature Ant + Ivy Maven Gradle Buildr
Dependency management
Versioning manually
Compile Java code, build
jars
Execute tests, report
results, fail build on failed
tests
Doesn’t include
html reports
Doesn’t include
html reports
Run quality check tools
(PMD, FindBugs, JavaDoc)
3rd
party task
libraries
3rd
party
plugins
Manually Manually
File generation (XmlBeans,
XSL, Velocity, AspectJ)
3rd
party task
libraries
3rd
party
plugins
Manually Manually
Out of the box
Not supported
Results Matrix cont’d
Desired Feature Ant + Ivy Maven Gradle Buildr
Property expansion / token
substitution
Build vs. deploy vs. release Manually
defined
Full control when needed Custom XML
“scripts”
Write custom
plugin or
embedded Ant
script
Groovy code
directly in build
file
Ruby code
directly in build
file
Cross-platform
Runs on JVM Runs on JVM Runs on JVM
Runs on Ruby,
may need to
compile from
source
IDE Support
Eclipse only
Documentation / Support Excellent Growing but
still
inconsistent
Decent project
documentation,
few articles
Good project
documentation,
few articles
Out of the box
Not supported
Subjective Evaluation
 Ant, Ivy, Maven have been around the longest
 Restrictive vs. Open philosophy
 Smart defaults
 Dependency Management is a Good Thing™
 Ant has by far the best documentation and
examples available online
 Gradle is the least mature (but very promising)
 Buildr is very cool but has potential platform
issues (Ruby vs. JRuby, 64-bit)
Which Would You Choose?

Weitere ähnliche Inhalte

Was ist angesagt?

Apache ant
Apache antApache ant
Apache ant
koniik
 

Was ist angesagt? (18)

Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Maven
Maven Maven
Maven
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Apache Maven In 10 Slides
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 Slides
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
 
Apache ant
Apache antApache ant
Apache ant
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Development Tools - Maven
Development Tools - MavenDevelopment Tools - Maven
Development Tools - Maven
 

Andere mochten auch

Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
Enpel
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
Muhammad Mansoor
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
James Bayer
 

Andere mochten auch (19)

Releasing Projects Using Maven
Releasing Projects Using MavenReleasing Projects Using Maven
Releasing Projects Using Maven
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Building java projects with maven
Building java projects with mavenBuilding java projects with maven
Building java projects with maven
 
Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
JEE Programming - 07 EJB Programming
JEE Programming - 07 EJB ProgrammingJEE Programming - 07 EJB Programming
JEE Programming - 07 EJB Programming
 
JBoss Application Server 7
JBoss Application Server 7JBoss Application Server 7
JBoss Application Server 7
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
 
Where and when to use the Oracle Service Bus (OSB)
Where and when to use the Oracle Service Bus (OSB)Where and when to use the Oracle Service Bus (OSB)
Where and when to use the Oracle Service Bus (OSB)
 
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
Oracle OSB Tutorial 1
Oracle OSB Tutorial 1Oracle OSB Tutorial 1
Oracle OSB Tutorial 1
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 

Ähnlich wie Java build tool_comparison

Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
elliando dias
 
Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build Technology
Philip Johnson
 
Practical maven-slides 2
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2
Will Iverson
 

Ähnlich wie Java build tool_comparison (20)

Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
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
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Session 2
Session 2Session 2
Session 2
 
Session 2
Session 2Session 2
Session 2
 
Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introduction
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build Technology
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Practical maven-slides 2
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2
 
Maven basics
Maven basicsMaven basics
Maven basics
 

Mehr von Manav Prasad (20)

Experience with mulesoft
Experience with mulesoftExperience with mulesoft
Experience with mulesoft
 
Mulesoftconnectors
MulesoftconnectorsMulesoftconnectors
Mulesoftconnectors
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Mulesoft cloudhub
Mulesoft cloudhubMulesoft cloudhub
Mulesoft cloudhub
 
Perl tutorial
Perl tutorialPerl tutorial
Perl tutorial
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Jpa
JpaJpa
Jpa
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Json
Json Json
Json
 
The spring framework
The spring frameworkThe spring framework
The spring framework
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Exceptions in java
Exceptions in javaExceptions in java
Exceptions in java
 
Junit
JunitJunit
Junit
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 
Xpath
XpathXpath
Xpath
 
Xslt
XsltXslt
Xslt
 
Xhtml
XhtmlXhtml
Xhtml
 
Css
CssCss
Css
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Ajax
AjaxAjax
Ajax
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 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 🐘
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Java build tool_comparison

  • 2. Java Build Tool Comparison • Desired Features • The Contenders • Ant + Ivy • Maven • Gradle • Buildr • Others • Results Matrix • Subjective Evaluation • Which Would You Choose?
  • 3. Desired Features • Dependency management • Versioning • Compile Java code, build jars • Execute tests and report results, fail build on failed tests • Run quality-check tools (PMD, Findbugs, Checkstyles) • File generation (XmlBeans, Xsl, Velocity, AspectJ) • Property expansion / token substitution • Build vs. deploy vs. release • Full control when needed • Cross-platform • IDE Support • Documentation / Support
  • 4. Ant + Ivy  Ant is ubiquitous Java-based build tool Uses XML “script” files  Ivy is a dependency manager Artifact repository Dependency resolution, including transitive (Project A -> Hibernate -> Commons- Collections) Sync with external repositories
  • 5. Ant + Ivy  Module dependencies are declared in ivy.xml <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <info organisation=“org.hjug" module=“myModule"/> <dependencies> <dependency org="org.apache" name="ant" rev="1.7.0"/> <dependency org="org.apache" name="axis" rev="1.2rc3"/> <dependency org="org.junit" name="junit" rev="4.4"/> </dependencies> </ivy-module>
  • 6. Ant + Ivy  Add this to your Ant buildfile (build.xml) <project xmlns:ivy="antlib:org.apache.ivy.ant" name="pdk" default="default" basedir="."> … <!-- Ivy Taskdefs --> <path id="ivy.lib.path"> <fileset dir="C:/java-tools/apache-ivy-2.0.0" includes="*.jar"/> </path> <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/> <!-- Reference Ivy settings --> <ivy:settings file="${basedir}/../ivysettings.xml"/> <target name="ivy.resolve" description="--> retrieve dependencies with ivy"> <ivy:retrieve pattern=“${lib.dir}/[conf]/[artifact].[ext]”/> </target> <target name="ivy.publish" description="--> publish artifacts to local repository"> <ivy:publish resolver=“local” pubrevision=“${version}”> <artifacts pattern=“dist/[artifact].[ext]”/> </ivy:publish> </target>
  • 7. Ant + Ivy  Build steps defined and executed with Ant  Dependencies managed with Ivy  Ant targets to install, retrieve artifacts from Ivy repository
  • 8. Ant + Ivy Image copied from http://ant.apache.org/ivy/history/2.0.0/principle.html
  • 9. Maven  Project is defined by POM (Project Object Model)  Projects can contain sub-projects (modules)  Based on recommended project structure (e.g. src/main/java, src/main/resources, src/test/java, …)  Artifact-focused (i.e. What files does this build produce?)  Heavy emphasis on default configuration
  • 10. Maven  Build Lifecycle is defined as Phases, which execute sequentially 1. Validate 2. Compile 3. Test 4. Package 5. Integration-test 6. Verify 7. Install 8. Deploy
  • 11. Maven  Each Phase can be made up of zero or more Goals (tasks)  Project-specific configuration involves binding specific goals to specific phases (beyond the default settings)  Extensible plugin system (called Mojos)  Java-based or Ant-based  Comprehensive set of third-party plugins available
  • 12. Gradle  Built on top of Ant + Ivy  Build DSL written in Groovy  Uses Groovy AntBuilder ant.compile, ant.jar  Plugins define common tasks to build different types of projects java, groovy, war, …
  • 13. Gradle  Assumes Maven conventions for file locations (drop-in replacement for Maven) Can be altered with the convention object  Can use existing Maven or Ivy repositories
  • 14. Buildr  Built on Ruby Rake is similar to Ant (Ruby Make) RubyGems is similar to rpm (package manager, handles dependencies) Build script written in Ruby (internal DSL)
  • 15. Buildr  Pre-defined tasks  clean  compile  build  upload  install  javadoc  package  test  uninstall
  • 16. Buildr  Assumes Maven conventions for file locations (drop-in replacement for Maven) Can be altered  Can use existing Maven repositories
  • 17. Others  Gant  Rake  EasyAnt  Custom ?
  • 18. Results Matrix Desired Feature Ant + Ivy Maven Gradle Buildr Dependency management Versioning manually Compile Java code, build jars Execute tests, report results, fail build on failed tests Doesn’t include html reports Doesn’t include html reports Run quality check tools (PMD, FindBugs, JavaDoc) 3rd party task libraries 3rd party plugins Manually Manually File generation (XmlBeans, XSL, Velocity, AspectJ) 3rd party task libraries 3rd party plugins Manually Manually Out of the box Not supported
  • 19. Results Matrix cont’d Desired Feature Ant + Ivy Maven Gradle Buildr Property expansion / token substitution Build vs. deploy vs. release Manually defined Full control when needed Custom XML “scripts” Write custom plugin or embedded Ant script Groovy code directly in build file Ruby code directly in build file Cross-platform Runs on JVM Runs on JVM Runs on JVM Runs on Ruby, may need to compile from source IDE Support Eclipse only Documentation / Support Excellent Growing but still inconsistent Decent project documentation, few articles Good project documentation, few articles Out of the box Not supported
  • 20. Subjective Evaluation  Ant, Ivy, Maven have been around the longest  Restrictive vs. Open philosophy  Smart defaults  Dependency Management is a Good Thing™  Ant has by far the best documentation and examples available online  Gradle is the least mature (but very promising)  Buildr is very cool but has potential platform issues (Ruby vs. JRuby, 64-bit)
  • 21. Which Would You Choose?