SlideShare a Scribd company logo
1 of 59
Download to read offline
Will it live up to its promises?

APACHE MAVEN 3.X
Arnaud Héritier
                  •    eXo - Software Factory Manager
                        »  In charge of tools and methods
                  •    Apache Maven :
                        »  Committer since 2004 and member of the
                          Project Management Committee

                  •    Coauthor of « Apache Maven »
                        »  published by Pearson (in French)
                  •    Contact me :
                        »  http://aheritier.net
                        »  Twitter : @aheritier
                        »  Skype : aheritier



                          2
Definition

•  Apache Maven is a software project
   management and comprehension tool.
•  Based on the concept of a project object
   model (POM)
     » Maven can manage a project's build, binaries,
       reporting and documentation from a central piece
       of information.
•    Apache Maven is standards/conventions
     driven
     » How many of you are doing JEE and related
       developments ?
                             3
History




•  Initiated in 2001 by Jason Van Zyl in Alexandria,
   an Apache Jakarta project,
•  Moved to Turbine few months after,
•  Became a Top Level Project in 2003.
•  Maven 2.0 released in September 2005
•  Maven 3.0 released in October 2010
     » 3.0.3 – March 2011
                            4
Choose your way of thinking


Conventions approach       Scripting approach




                       5
Competitors

•  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…
•  Script oriented
    »  You can do what you want !
•  Reuse many of Maven conventions (directories layout,
   …) and services (repositories) but without enforcing
   them
•  The risk for them : Not being able to evolve due to the
   too high level of customization proposed to the user.
    »  We tried on Maven 1 and it died because of that. It was
        impossible to create a set of tests to cover all usages.
     »  It’s like providing a framework without a well tested set of
        public API 


                                    6
With scripts oriented builds
You can have                    But often you have
(if you have good skills)       (moreover after years …)




                            7
With Maven
We dream to deliver       But yesterday we too often had
(Maven 3.x)               (Maven 2.x)




                      8
Apache Maven 3.x
BACKWARD COMPATIBILITY



                   9
Backward compatibility - Criticisms

•  Migration from Maven 1 to Maven 2 was
   impossible. Everything had to be re-done.
•  Updates between 2.x versions and also
   between 2.0.x weren’t often without side
   effects.




                        10
Backward compatibility

•  Near to 700 integration tests
•  Tested for several months on a large set of
   OSS projects
•  7 alphas + 3 betas versions

•  A bug fix release every 6 weeks

•  It’s a revolution under the hood but an
   evolution for end users




                         11
Maven 3.0.x ITs




                  674




                        12
Apache Maven 3.x
PERFORMANCES



                   13
Performances - Criticisms

•  Maven is slow
•  It spends its time to download the world

•  Whereas everybody has multicore CPUs, it
   doesn’t allow to process modules builds in
   parallel




                        14
Performances

•  A set of benchmark tools was developed to
   measure Maven performances (IO, CPU,
   Memory, Network …)
•  Startup and execution times are reduced
     » Java 5 optimizations
     » Code cleanup and improvements
•  Reduced Memory footprint
•  Artifacts Resolution Caching
     » .lastUpdated files in your local repo
     » Enforce checks with –U option
                              15
Performances – Parallel builds

•    Parallel builds
     » An execution plan is predefined at startup to
       define which modules could be built in //
     » Requires to have up to date plugins to avoid dead
       locks and some others issues
     » Launch a build with 2 threads
       •  mvn –T 2 install
     » Launch a build with 2 threads per CPU core
       •  mvn –T 2C install




                              16
Performances – mvnsh

•    Performances optimizations
     » Intelligent cache system (artifacts resolution,
       project descriptors …)
     » No need to restart a JVM for each build
•    Cross platform « unix like » shell
     » Alias, environment settings …
     » Color highlighting




                                17
Performances – mvnsh

•    All in one
     » Includes Maven 3.x
     » Allows to have color highlighting with “standard”
       Maven 3.x
•    Developed and freely distributed by Sonatype




                             18
Performances – mvnsh




                       19
Apache Maven 3.x
EXTENSIBILITY



                   20
Extensibility - Criticisms

•    It is difficult and time consuming to extend
     maven (write plugins)
     » Many unknown technologies like Plexus for IOC
•    It is difficult/impossible to reuse maven
     plugins
     » Its impossible to extend plugins/mojo and
       lifecycles




                             21
Extensibility

•    New APIs to improve abstraction of
     underneath implementation
     » Aether : to manage artifacts and repositories
•  Plugin classloader partitioning
•  Embeddable

•  IOC replaced by Guice
     » For now (3.0) a wrapper is hiding the change
     » You don’t yet use Guice directly (from plugins for
       example)


                             22
Apache Maven 3.x
ROBUSTNESS



                   23
Robustness - Criticisms

•  Builds aren’t predictable
•  Errors are difficult to diagnose




                          24
Robustness - Validations

•    Many more validations in POMs (warnings or
     errors)
     » Missing plugins versions
     » Duplicated dependencies in a POM
     » Incoherent inheritance (wrong relative path or
       parent not in the upper directory)
•    Improved error messages with links to wiki
     pages for more detailed information




                              25
Robustness – Artifacts management

•    Parent POMs prefer to resolve from
     repositories
     » Version less parent will be available in a future
       maven 3.x release by using the relativePath
       element
•    Profiles usage consolidation
     » No more profiles.xml (incompatible with future
       polyglot feature)




                              26
Robustness – Artifacts management

•  No more support for legacy repository layout
   for Maven 1.0
•  SNAPSHOTs are always deployed with
   timestamps




                        27
Robustness – Plugins management

•    Plugin version is by default RELEASE and no
     more SNAPSHOT
     » Affects command-line invocation
•    Plugins cannot use versions LATEST or
     RELEASE
     » Affects command-line invocation and POM
•    Plugins are resolved only from
     <pluginRepository> entries



                            28
Robustness – Site plugin

•    Site plugin is now completely extracted from
     Maven core
     » It has its own lifecycle
     » reporting section in POM becomes useless
       (moved in plugin configuration)




                             29
Apache Maven 3.x
POM



                   30
Criticisms

•  XML, we don’t like it
•  POM is too verbose

•  POM v4 didn’t evolve last 5 years
     » When will you add new common attributes to
      ease plugins configuration (encoding …)
     » New feature like global exclusions




                             31
POM

•  No change in POM syntax for Maven 3.0
•  Changes will occur in 3.x versions
     » New model with a new version
     » Only new things
     » Generation / deployment of 4.0.0 current POM to
       keep backward compatibility with old maven
       versions
•    Mixins to allow to import POM fragments



                            32
POM - Polyglot

•  Developed and freely distributed by Sonatype
•  Extended version of Maven 3.0 using its new
   embedding and extensibility capabilities
•  Allow translation (read/write) from/to various
   syntaxes
     » Yaml
     » Scala
     » Groovy
•    Allow macros and freeform scripting


                          33
Apache Maven
TO GO FURTHER …
Apache Maven
IDE



               35
Eclipse

•    Integration from maven (eclipse:eclipse)
     » Allow many customizations
     » Support many versions/variants of eclipse
     » Support many usages (ear …)
     » Doesn’t support projects with “pom” packaging
     » Few support from dev team
     » Many bugs in classpath management
     » Asynchronous
       •  You have to regenerate and reload project each time you
          change a POM)


                                   36
Eclipse

•    Integration from eclipse (m2eclipse)
     » Synchronous
     » Nice UI and services to edit POMs
     » Support projects with “pom” packaging
     » Doesn’t support all usages like EAR with WTP
     » Doesn’t support very well a large number of
       modules
     » Slow down eclipse on large projects because of a
       lack of support of incremental build in Maven 2.x
       and its plugins


                             37
Eclipse (m2eclipse)




                      38
Eclipse (m2eclipse)




                      39
Eclipse (m2eclipse)




                      40
Idea IntelliJ




                41
Netbeans




           42
Apache Maven
COMMUNITY



               43
Users Mailing List

•    users@maven.apache.or               •    Blue :
     g                                        » Number of subscribers
     » Traffic statistics cover a
       total of 2025 days.               •    Red :
     » Current subscribers: 1936              » Number of messages
     » Current digest                           per day
       subscribers: 48
     » Total posts (2025 days):
        89687
     » Mean posts per day:
        44.29
•    http://pulse.apache.org/

                                    44
Apache Maven Web Site




                   45
Dowloads

Per month downloads
http://people.apache.org/~vgritsenko/stats/
 projects/maven.html




                        46
The team

•  60 committers,
•  More than 30 active in 2009,

•  Several organizations like Sonatype, deliver
   resources and professional support,
•  A community less isolated : more interactions
   with Eclipse, Jetty,




                        47
Commit Statistics




•    In light blue the number of active commiters




                           48
Apache Maven
DOCUMENTATIONS



               49
Some links

•    The main web site :
     » http://maven.apache.org
•    Project’s team wiki :
     » http://docs.codehaus.org/display/MAVEN
•    Project’s users wiki :
     » http://docs.codehaus.org/display/MAVENUSER




                              50
Books

•    Nicolas De loof
     Arnaud Héritier
     » Published by Pearson
     » Collection Référence
     » Based on our own
       experiences with
       Maven.
     » From beginners to
       experts.
     » In French only

                              51
Books

•    Sonatype / O’Reilly :
     » The Definitive Guide
     » http://
       www.sonatype.com/
       books
     » Free download
     » Available in several
       languages




                              52
Books

•    Apache Maven 2
     Effective
     Implementation
     » Brett Porter, Maria
       Odea Ching
     » https://
       www.packtpub.com/
       apache-maven-2-
       effective-
       implementation/book


                             53
Books

•    Exist Global
     » Better builds with
       Maven
     » http://
       www.maestrodev.com
       /better-build-maven
     » Free download




                             54
Apache Maven
SUPPORT



               55
Support

•    Mailing lists
     » http://maven.apache.org/mail-lists.html
•    IRC
     » irc.codehaus.org - #maven
•    Forums
     » http://www.developpez.net/ forum maven
     » In French
•    Dedicated support
     » Sonatype and many others companies

                             56
Apache Maven
QUESTIONS ?



               57
Licence et copyrights

•  Photos and logos belong to their respective
   authors/owners
•  Various ideas are coming from the excellent
   presentation done by Matthew McCullough :
     » http://www.slideshare.net/matthewmccullough/
      maven-30-at-oredev




                            58
Licence et copyrights

•    Content under Creative Commons 3.0
     » Attribution — You must attribute the work in the manner
       specified by the author or licensor (but not in any way that suggests
       that they endorse you or your use of the work).

     » Noncommercial — You may not use this work for commercial
       purposes.

     » Share Alike — If you alter, transform, or build upon this work,
       you may distribute the resulting work only under the same or similar
       license to this one.

•    http://creativecommons.org/licenses/by-nc-sa/3.0/us/




                                      59

More Related Content

What's hot

Polyglot Plugin Programming
Polyglot Plugin ProgrammingPolyglot Plugin Programming
Polyglot Plugin Programming
Atlassian
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 

What's hot (20)

Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
CPOSC2014: Next Generation Cloud -- Rise of the Unikernel
CPOSC2014: Next Generation Cloud -- Rise of the UnikernelCPOSC2014: Next Generation Cloud -- Rise of the Unikernel
CPOSC2014: Next Generation Cloud -- Rise of the Unikernel
 
SCALE13x: Next Generation of the Cloud - Rise of the Unikernel
SCALE13x: Next Generation of the Cloud - Rise of the UnikernelSCALE13x: Next Generation of the Cloud - Rise of the Unikernel
SCALE13x: Next Generation of the Cloud - Rise of the Unikernel
 
Xen Orchestra: A new Web UI for XCP
Xen Orchestra: A new Web UI for XCPXen Orchestra: A new Web UI for XCP
Xen Orchestra: A new Web UI for XCP
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Polyglot Plugin Programming
Polyglot Plugin ProgrammingPolyglot Plugin Programming
Polyglot Plugin Programming
 
Xen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
Xen Orchestra: XAPI and XenServer from the web-XPUS13 LambertXen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
Xen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Maven
MavenMaven
Maven
 
System Architecture using Maven Modularity
System Architecture using Maven ModularitySystem Architecture using Maven Modularity
System Architecture using Maven Modularity
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Development Tools - Maven
Development Tools - MavenDevelopment Tools - Maven
Development Tools - Maven
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
MAVEN
MAVENMAVEN
MAVEN
 

Viewers also liked (6)

Ec big summit-portland-20100615
Ec big summit-portland-20100615Ec big summit-portland-20100615
Ec big summit-portland-20100615
 
(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...
(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...
(Speaker Notes Version) Architecting An Enterprise Storage Platform Using Obj...
 
NM2216 DW3_1
NM2216 DW3_1NM2216 DW3_1
NM2216 DW3_1
 
Ingles 5 trabajo final urbe
Ingles 5 trabajo final urbeIngles 5 trabajo final urbe
Ingles 5 trabajo final urbe
 
1st Web Audit Report
1st Web Audit Report1st Web Audit Report
1st Web Audit Report
 
Final%20project
Final%20projectFinal%20project
Final%20project
 

Similar to ToursJUG-Maven 3.x, will it lives up to its promises

Apache Continuum Build, Test, and Release
Apache Continuum Build, Test, and ReleaseApache Continuum Build, Test, and Release
Apache Continuum Build, Test, and Release
elliando dias
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola
 

Similar to ToursJUG-Maven 3.x, will it lives up to its promises (20)

LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment ToolsBP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
 
Apache Continuum Build, Test, and Release
Apache Continuum Build, Test, and ReleaseApache Continuum Build, Test, and Release
Apache Continuum Build, Test, and Release
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Containing the world with Docker
Containing the world with DockerContaining the world with Docker
Containing the world with Docker
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
Build tool
Build toolBuild tool
Build tool
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
ONAP on Vagrant
ONAP on VagrantONAP on Vagrant
ONAP on Vagrant
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...
 
Eclipse DemoCamp Munich - Docker Tooling and Vagrant Tooling
Eclipse DemoCamp Munich  - Docker Tooling and Vagrant ToolingEclipse DemoCamp Munich  - Docker Tooling and Vagrant Tooling
Eclipse DemoCamp Munich - Docker Tooling and Vagrant Tooling
 
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
 
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
 
Containers - Cloud Phoenix March Meetup
Containers - Cloud Phoenix March MeetupContainers - Cloud Phoenix March Meetup
Containers - Cloud Phoenix March Meetup
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container Ecosystem
 
Docker and Jenkins Pipeline
Docker and Jenkins PipelineDocker and Jenkins Pipeline
Docker and Jenkins Pipeline
 

More from Arnaud Héritier

More from Arnaud Héritier (20)

Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMA
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on track
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les rails
 
Sonar In Action 20110302-vn
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vn
 
2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview
 
CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - Quickie
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promises
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkins
 
eXo Software Factory Overview
eXo Software Factory OvervieweXo Software Factory Overview
eXo Software Factory Overview
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXo
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
 
Riviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - Maven
 
Lausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - Maven
 
Geneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - MavenGeneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - Maven
 
Alpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache Maven
 
Maven for eXo VN
Maven for eXo VNMaven for eXo VN
Maven for eXo VN
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven
 
20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven
 
20081008 - Tours Jug - Apache Maven
20081008  - Tours Jug - Apache Maven20081008  - Tours Jug - Apache Maven
20081008 - Tours Jug - Apache Maven
 
20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
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
 

Recently uploaded (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

ToursJUG-Maven 3.x, will it lives up to its promises

  • 1. Will it live up to its promises? APACHE MAVEN 3.X
  • 2. Arnaud Héritier •  eXo - Software Factory Manager »  In charge of tools and methods •  Apache Maven : »  Committer since 2004 and member of the Project Management Committee •  Coauthor of « Apache Maven » »  published by Pearson (in French) •  Contact me : »  http://aheritier.net »  Twitter : @aheritier »  Skype : aheritier 2
  • 3. Definition •  Apache Maven is a software project management and comprehension tool. •  Based on the concept of a project object model (POM) » Maven can manage a project's build, binaries, reporting and documentation from a central piece of information. •  Apache Maven is standards/conventions driven » How many of you are doing JEE and related developments ? 3
  • 4. History •  Initiated in 2001 by Jason Van Zyl in Alexandria, an Apache Jakarta project, •  Moved to Turbine few months after, •  Became a Top Level Project in 2003. •  Maven 2.0 released in September 2005 •  Maven 3.0 released in October 2010 » 3.0.3 – March 2011 4
  • 5. Choose your way of thinking Conventions approach Scripting approach 5
  • 6. Competitors •  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr… •  Script oriented »  You can do what you want ! •  Reuse many of Maven conventions (directories layout, …) and services (repositories) but without enforcing them •  The risk for them : Not being able to evolve due to the too high level of customization proposed to the user. »  We tried on Maven 1 and it died because of that. It was impossible to create a set of tests to cover all usages. »  It’s like providing a framework without a well tested set of public API  6
  • 7. With scripts oriented builds You can have But often you have (if you have good skills) (moreover after years …) 7
  • 8. With Maven We dream to deliver But yesterday we too often had (Maven 3.x) (Maven 2.x) 8
  • 9. Apache Maven 3.x BACKWARD COMPATIBILITY 9
  • 10. Backward compatibility - Criticisms •  Migration from Maven 1 to Maven 2 was impossible. Everything had to be re-done. •  Updates between 2.x versions and also between 2.0.x weren’t often without side effects. 10
  • 11. Backward compatibility •  Near to 700 integration tests •  Tested for several months on a large set of OSS projects •  7 alphas + 3 betas versions •  A bug fix release every 6 weeks •  It’s a revolution under the hood but an evolution for end users 11
  • 12. Maven 3.0.x ITs 674 12
  • 14. Performances - Criticisms •  Maven is slow •  It spends its time to download the world •  Whereas everybody has multicore CPUs, it doesn’t allow to process modules builds in parallel 14
  • 15. Performances •  A set of benchmark tools was developed to measure Maven performances (IO, CPU, Memory, Network …) •  Startup and execution times are reduced » Java 5 optimizations » Code cleanup and improvements •  Reduced Memory footprint •  Artifacts Resolution Caching » .lastUpdated files in your local repo » Enforce checks with –U option 15
  • 16. Performances – Parallel builds •  Parallel builds » An execution plan is predefined at startup to define which modules could be built in // » Requires to have up to date plugins to avoid dead locks and some others issues » Launch a build with 2 threads •  mvn –T 2 install » Launch a build with 2 threads per CPU core •  mvn –T 2C install 16
  • 17. Performances – mvnsh •  Performances optimizations » Intelligent cache system (artifacts resolution, project descriptors …) » No need to restart a JVM for each build •  Cross platform « unix like » shell » Alias, environment settings … » Color highlighting 17
  • 18. Performances – mvnsh •  All in one » Includes Maven 3.x » Allows to have color highlighting with “standard” Maven 3.x •  Developed and freely distributed by Sonatype 18
  • 21. Extensibility - Criticisms •  It is difficult and time consuming to extend maven (write plugins) » Many unknown technologies like Plexus for IOC •  It is difficult/impossible to reuse maven plugins » Its impossible to extend plugins/mojo and lifecycles 21
  • 22. Extensibility •  New APIs to improve abstraction of underneath implementation » Aether : to manage artifacts and repositories •  Plugin classloader partitioning •  Embeddable •  IOC replaced by Guice » For now (3.0) a wrapper is hiding the change » You don’t yet use Guice directly (from plugins for example) 22
  • 24. Robustness - Criticisms •  Builds aren’t predictable •  Errors are difficult to diagnose 24
  • 25. Robustness - Validations •  Many more validations in POMs (warnings or errors) » Missing plugins versions » Duplicated dependencies in a POM » Incoherent inheritance (wrong relative path or parent not in the upper directory) •  Improved error messages with links to wiki pages for more detailed information 25
  • 26. Robustness – Artifacts management •  Parent POMs prefer to resolve from repositories » Version less parent will be available in a future maven 3.x release by using the relativePath element •  Profiles usage consolidation » No more profiles.xml (incompatible with future polyglot feature) 26
  • 27. Robustness – Artifacts management •  No more support for legacy repository layout for Maven 1.0 •  SNAPSHOTs are always deployed with timestamps 27
  • 28. Robustness – Plugins management •  Plugin version is by default RELEASE and no more SNAPSHOT » Affects command-line invocation •  Plugins cannot use versions LATEST or RELEASE » Affects command-line invocation and POM •  Plugins are resolved only from <pluginRepository> entries 28
  • 29. Robustness – Site plugin •  Site plugin is now completely extracted from Maven core » It has its own lifecycle » reporting section in POM becomes useless (moved in plugin configuration) 29
  • 31. Criticisms •  XML, we don’t like it •  POM is too verbose •  POM v4 didn’t evolve last 5 years » When will you add new common attributes to ease plugins configuration (encoding …) » New feature like global exclusions 31
  • 32. POM •  No change in POM syntax for Maven 3.0 •  Changes will occur in 3.x versions » New model with a new version » Only new things » Generation / deployment of 4.0.0 current POM to keep backward compatibility with old maven versions •  Mixins to allow to import POM fragments 32
  • 33. POM - Polyglot •  Developed and freely distributed by Sonatype •  Extended version of Maven 3.0 using its new embedding and extensibility capabilities •  Allow translation (read/write) from/to various syntaxes » Yaml » Scala » Groovy •  Allow macros and freeform scripting 33
  • 34. Apache Maven TO GO FURTHER …
  • 36. Eclipse •  Integration from maven (eclipse:eclipse) » Allow many customizations » Support many versions/variants of eclipse » Support many usages (ear …) » Doesn’t support projects with “pom” packaging » Few support from dev team » Many bugs in classpath management » Asynchronous •  You have to regenerate and reload project each time you change a POM) 36
  • 37. Eclipse •  Integration from eclipse (m2eclipse) » Synchronous » Nice UI and services to edit POMs » Support projects with “pom” packaging » Doesn’t support all usages like EAR with WTP » Doesn’t support very well a large number of modules » Slow down eclipse on large projects because of a lack of support of incremental build in Maven 2.x and its plugins 37
  • 42. Netbeans 42
  • 44. Users Mailing List •  users@maven.apache.or •  Blue : g » Number of subscribers » Traffic statistics cover a total of 2025 days. •  Red : » Current subscribers: 1936 » Number of messages » Current digest per day subscribers: 48 » Total posts (2025 days): 89687 » Mean posts per day: 44.29 •  http://pulse.apache.org/ 44
  • 45. Apache Maven Web Site 45
  • 47. The team •  60 committers, •  More than 30 active in 2009, •  Several organizations like Sonatype, deliver resources and professional support, •  A community less isolated : more interactions with Eclipse, Jetty, 47
  • 48. Commit Statistics •  In light blue the number of active commiters 48
  • 50. Some links •  The main web site : » http://maven.apache.org •  Project’s team wiki : » http://docs.codehaus.org/display/MAVEN •  Project’s users wiki : » http://docs.codehaus.org/display/MAVENUSER 50
  • 51. Books •  Nicolas De loof Arnaud Héritier » Published by Pearson » Collection Référence » Based on our own experiences with Maven. » From beginners to experts. » In French only 51
  • 52. Books •  Sonatype / O’Reilly : » The Definitive Guide » http:// www.sonatype.com/ books » Free download » Available in several languages 52
  • 53. Books •  Apache Maven 2 Effective Implementation » Brett Porter, Maria Odea Ching » https:// www.packtpub.com/ apache-maven-2- effective- implementation/book 53
  • 54. Books •  Exist Global » Better builds with Maven » http:// www.maestrodev.com /better-build-maven » Free download 54
  • 56. Support •  Mailing lists » http://maven.apache.org/mail-lists.html •  IRC » irc.codehaus.org - #maven •  Forums » http://www.developpez.net/ forum maven » In French •  Dedicated support » Sonatype and many others companies 56
  • 58. Licence et copyrights •  Photos and logos belong to their respective authors/owners •  Various ideas are coming from the excellent presentation done by Matthew McCullough : » http://www.slideshare.net/matthewmccullough/ maven-30-at-oredev 58
  • 59. Licence et copyrights •  Content under Creative Commons 3.0 » Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). » Noncommercial — You may not use this work for commercial purposes. » Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. •  http://creativecommons.org/licenses/by-nc-sa/3.0/us/ 59