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

Arnaud Héritier
Arnaud HéritierJenkins and Apache Maven Evangelist / Support Engineer um CloudBees
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
ROBUSNESS



                   23
Robusness - Criticisms

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




                          24
Robusness - 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
Robusness – 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
Robusness – Artifacts management

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




                        27
Robusness – 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
Robusness – 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
QUESTIONS ?



               34
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




                            35
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/




                                      36
Apache Maven
TO GO FURTHER …
Apache Maven
COMMUNITY



               38
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/

                                    39
Apache Maven Web Site




                   40
Dowloads

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




                        41
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,




                        42
Commit Statistics




                    43
Apache Maven
DOCUMENTATIONS



               44
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




                              45
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

                              46
Books

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




                              47
Books

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


                             48
Books

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




                             49
Apache Maven
SUPPORT



               50
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

                             51
1 von 51

Recomendados

ToursJUG-Maven 3.x, will it lives up to its promises von
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
766 views59 Folien
LyonJUG - Maven 3.x, will it live up to its promises? von
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?Arnaud Héritier
641 views50 Folien
Maven: from Scratch to Production (.pdf) von
Maven: from Scratch to Production (.pdf)Maven: from Scratch to Production (.pdf)
Maven: from Scratch to Production (.pdf)Johan Mynhardt
1.2K views26 Folien
Apache maven and its impact on java 9 (Java One 2017) von
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Robert Scholte
863 views55 Folien
Maven Basics - Explained von
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
1.1K views46 Folien
Maven 3 Overview von
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
2.7K views22 Folien

Más contenido relacionado

Was ist angesagt?

Maven for Dummies von
Maven for DummiesMaven for Dummies
Maven for DummiesTomer Gabel
6.3K views9 Folien
An introduction to Maven von
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
7.9K views78 Folien
Using Maven 2 von
Using Maven 2Using Maven 2
Using Maven 2andyhot
2.8K views15 Folien
Java Builds with Maven and Ant von
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid Noble
2.4K views56 Folien
Apache maven 2 overview von
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overviewReturn on Intelligence
1.8K views37 Folien
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012 von
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 2012Sam Brannen
7.9K views83 Folien

Was ist angesagt?(18)

Maven for Dummies von Tomer Gabel
Maven for DummiesMaven for Dummies
Maven for Dummies
Tomer Gabel6.3K views
An introduction to Maven von Joao Pereira
An introduction to MavenAn introduction to Maven
An introduction to Maven
Joao Pereira7.9K views
Using Maven 2 von andyhot
Using Maven 2Using Maven 2
Using Maven 2
andyhot2.8K views
Java Builds with Maven and Ant von David Noble
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
David Noble2.4K views
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012 von Sam Brannen
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
Sam Brannen7.9K views
Spring Framework 3.2 - What's New von Sam Brannen
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
Sam Brannen7.6K views
An Introduction to Maven von Vadym Lotar
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar13.9K views
Maven 2 features von Angel Ruiz
Maven 2 featuresMaven 2 features
Maven 2 features
Angel Ruiz4.4K views
Hands On with Maven von Sid Anand
Hands On with MavenHands On with Maven
Hands On with Maven
Sid Anand6.1K views
An Introduction to Maven Part 1 von MD Sayem Ahmed
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed899 views
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev von Werner Keil
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Werner Keil820 views

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

Lorraine JUG (1st June, 2010) - Maven von
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenArnaud Héritier
1.1K views141 Folien
Apache Maven - eXo TN presentation von
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
915 views129 Folien
Apache Continuum Build, Test, and Release von
Apache Continuum Build, Test, and ReleaseApache Continuum Build, Test, and Release
Apache Continuum Build, Test, and Releaseelliando dias
1.6K views43 Folien
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools von
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 ToolsAlfresco Software
1.3K views27 Folien
software technology benchmarking von
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarkingMallikarjuna G D
246 views158 Folien
Linux containers and docker von
Linux containers and dockerLinux containers and docker
Linux containers and dockerFabio Fumarola
1.9K views47 Folien

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

Lorraine JUG (1st June, 2010) - Maven von Arnaud Héritier
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
Arnaud Héritier1.1K views
Apache Continuum Build, Test, and Release von elliando dias
Apache Continuum Build, Test, and ReleaseApache Continuum Build, Test, and Release
Apache Continuum Build, Test, and Release
elliando dias1.6K views
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools von Alfresco Software
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
Alfresco Software1.3K views
Linux containers and docker von Fabio Fumarola
Linux containers and dockerLinux containers and docker
Linux containers and docker
Fabio Fumarola1.9K views
Ci jenkins maven svn von Ankur Goyal
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
Ankur Goyal2.2K views
2 Linux Container and Docker von Fabio Fumarola
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola8.1K views
Top Maven Interview Questions in 2020 | Edureka von Edureka!
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!1.3K views
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21 von drewz lin
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
drewz lin6.6K views
Openstack components as containerized microservices von Miguel Zuniga
Openstack components as containerized microservicesOpenstack components as containerized microservices
Openstack components as containerized microservices
Miguel Zuniga913 views
Develop with linux containers and docker von Fabio Fumarola
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
Fabio Fumarola1.4K views

Más de Arnaud Héritier

Devops Recto-Verso @ DevoxxMA von
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMAArnaud Héritier
3K views47 Folien
Java is evolving rapidly: Maven helps you staying on track von
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 trackArnaud Héritier
822 views38 Folien
Quand java prend de la vitesse, apache maven vous garde sur les rails von
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 railsArnaud Héritier
776 views38 Folien
Sonar In Action 20110302-vn von
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vnArnaud Héritier
914 views19 Folien
2014 August - eXo Software Factory Overview von
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory OverviewArnaud Héritier
2.4K views59 Folien
CRaSH @ JUGSummerCamp 2012 - Quickie von
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieArnaud Héritier
1.5K views14 Folien

Más de Arnaud Héritier(20)

Java is evolving rapidly: Maven helps you staying on track von Arnaud Héritier
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
Arnaud Héritier822 views
Quand java prend de la vitesse, apache maven vous garde sur les rails von Arnaud Héritier
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
Arnaud Héritier776 views
2014 August - eXo Software Factory Overview von Arnaud Héritier
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview
Arnaud Héritier2.4K views
CRaSH @ JUGSummerCamp 2012 - Quickie von Arnaud Héritier
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - Quickie
Arnaud Héritier1.5K views
LavaJUG-Maven 3.x, will it lives up to its promises von Arnaud Héritier
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
Arnaud Héritier915 views
Hands on iOS developments with jenkins von Arnaud Héritier
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkins
Arnaud Héritier4.4K views
YaJUG-Maven 3.x, will it lives up to its promises von Arnaud Héritier
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promises
Arnaud Héritier513 views
BordeauxJUG-Maven 3.x, will it lives up to its promises von Arnaud Héritier
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promises
Arnaud Héritier706 views
Apache Maven - eXo VN office presentation von Arnaud Héritier
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
Arnaud Héritier565 views
Riviera JUG (20th April, 2010) - Maven von Arnaud Héritier
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - Maven
Arnaud Héritier861 views
Lausanne Jug (08th April, 2010) - Maven von Arnaud Héritier
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - Maven
Arnaud Héritier4.1K views
Geneva Jug (30th March, 2010) - Maven von Arnaud Héritier
Geneva Jug (30th March, 2010) - MavenGeneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - Maven
Arnaud Héritier1.3K views
Alpes Jug (29th March, 2010) - Apache Maven von Arnaud Héritier
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache Maven
Arnaud Héritier1.5K views
20080311 - Paris Vi Master STL TA - Initiation Maven von Arnaud Héritier
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven
Arnaud Héritier1.3K views

Último

Business Analyst Series 2023 - Week 3 Session 5 von
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
248 views20 Folien
Network Source of Truth and Infrastructure as Code revisited von
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
26 views45 Folien
HTTP headers that make your website go faster - devs.gent November 2023 von
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
22 views151 Folien
Five Things You SHOULD Know About Postman von
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
33 views43 Folien
Vertical User Stories von
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 Folien
Empathic Computing: Delivering the Potential of the Metaverse von
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
478 views80 Folien

Último(20)

Business Analyst Series 2023 - Week 3 Session 5 von DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
HTTP headers that make your website go faster - devs.gent November 2023 von Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
Five Things You SHOULD Know About Postman von Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views
Empathic Computing: Delivering the Potential of the Metaverse von Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst478 views
Case Study Copenhagen Energy and Business Central.pdf von Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Special_edition_innovator_2023.pdf von WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2217 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 von Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
Attacking IoT Devices from a Web Perspective - Linux Day von Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri16 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows von Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... von Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views
Data Integrity for Banking and Financial Services von Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
Voice Logger - Telephony Integration Solution at Aegis von Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
Serverless computing with Google Cloud (2023-24) von wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views

ToulouseJUG-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. Robusness - Criticisms •  Builds aren’t predictable •  Errors are difficult to diagnose 24
  • 25. Robusness - 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. Robusness – 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. Robusness – Artifacts management •  No more support for legacy repository layout for Maven 1.0 •  SNAPSHOTs are always deployed with timestamps 27
  • 28. Robusness – 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. Robusness – 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
  • 35. 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 35
  • 36. 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/ 36
  • 37. Apache Maven TO GO FURTHER …
  • 39. 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/ 39
  • 40. Apache Maven Web Site 40
  • 42. 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, 42
  • 45. 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 45
  • 46. 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 46
  • 47. Books •  Sonatype / O’Reilly : » The Definitive Guide » http:// www.sonatype.com/ books » Free download » Available in several languages 47
  • 48. Books •  Apache Maven 2 Effective Implementation » Brett Porter, Maria Odea Ching » https:// www.packtpub.com/ apache-maven-2- effective- implementation/book 48
  • 49. Books •  Exist Global » Better builds with Maven » http:// www.maestrodev.com /better-build-maven » Free download 49
  • 51. 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 51