0
Will it live up to its promises?APACHE MAVEN 3.X
Arnaud Héritier                  •    eXo - Software Factory Manager                        »  In charge of tools and meth...
Definition•  Apache Maven is a software project   management and comprehension tool.•  Based on the concept of a project o...
History•  Initiated in 2001 by Jason Van Zyl in Alexandria,   an Apache Jakarta project,•  Moved to Turbine few months aft...
Choose your way of thinkingConventions approach       Scripting approach                       5
Competitors•  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…•  Script oriented    »  You can do what you want !•  Reuse many o...
With scripts oriented buildsYou can have                    But often you have(if you have good skills)       (moreover af...
With MavenWe dream to deliver       But yesterday we too often had(Maven 3.x)               (Maven 2.x)                   ...
Apache Maven 3.xBACKWARD COMPATIBILITY                   9
Backward compatibility - Criticisms•  Migration from Maven 1 to Maven 2 was   impossible. Everything had to be re-done.•  ...
Backward compatibility•  Near to 700 integration tests•  Tested for several months on a large set of   OSS projects•  7 al...
Maven 3.0.x ITs                  674                        12
Apache Maven 3.xPERFORMANCES                   13
Performances - Criticisms•  Maven is slow•  It spends its time to download the world•  Whereas everybody has multicore CPU...
Performances•  A set of benchmark tools was developed to   measure Maven performances (IO, CPU,   Memory, Network …)•  Sta...
Performances – Parallel builds•    Parallel builds     » An execution plan is predefined at startup to       define which ...
Performances – mvnsh•    Performances optimizations     » Intelligent cache system (artifacts resolution,       project de...
Performances – mvnsh•    All in one     » Includes Maven 3.x     » Allows to have color highlighting with “standard”      ...
Performances – mvnsh                       19
Apache Maven 3.xEXTENSIBILITY                   20
Extensibility - Criticisms•    It is difficult and time consuming to extend     maven (write plugins)     » Many unknown t...
Extensibility•    New APIs to improve abstraction of     underneath implementation     » Aether : to manage artifacts and ...
Apache Maven 3.xROBUSNESS                   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     » Du...
Robusness – Artifacts management•    Parent POMs prefer to resolve from     repositories     » Version less parent will be...
Robusness – Artifacts management•  No more support for legacy repository layout   for Maven 1.0•  SNAPSHOTs are always dep...
Robusness – Plugins management•    Plugin version is by default RELEASE and no     more SNAPSHOT     » Affects command-lin...
Robusness – Site plugin•    Site plugin is now completely extracted from     Maven core     » It has its own lifecycle    ...
Apache Maven 3.xPOM                   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 co...
POM•  No change in POM syntax for Maven 3.0•  Changes will occur in 3.x versions     » New model with a new version     » ...
POM - Polyglot•  Developed and freely distributed by Sonatype•  Extended version of Maven 3.0 using its new   embedding an...
Apache MavenQUESTIONS ?               34
Licence et copyrights•  Photos and logos belong to their respective   authors/owners•  Various ideas are coming from the e...
Licence et copyrights•    Content under Creative Commons 3.0     » Attribution — You must attribute the work in the manner...
Apache MavenTO GO FURTHER …
Apache MavenCOMMUNITY               38
Users Mailing List•    users@maven.apache.or               •    Blue :     g                                        » Numb...
Apache Maven Web Site                   40
DowloadsPer month downloadshttp://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 pr...
Commit Statistics•    In light blue the number of active commiters                           43
Apache MavenDOCUMENTATIONS               44
Some links•    The main web site :     » http://maven.apache.org•    Project’s team wiki :     » http://docs.codehaus.org/...
Books•    Nicolas De loof     Arnaud Héritier     » Published by Pearson     » Collection Référence     » Based on our own...
Books•    Sonatype / O’Reilly :     » The Definitive Guide     » http://       www.sonatype.com/       books     » Free do...
Books•    Apache Maven 2     Effective     Implementation     » Brett Porter, Maria       Odea Ching     » https://       ...
Books•    Exist Global     » Better builds with       Maven     » http://       www.maestrodev.com       /better-build-mav...
Apache MavenSUPPORT               50
Support•    Mailing lists     » http://maven.apache.org/mail-lists.html•    IRC     » irc.codehaus.org - #maven•    Forums...
Upcoming SlideShare
Loading in...5
×

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

848

Published on

Maven 3.x @ Bordeaux Java Users Group - March 17th, 2011

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
848
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "BordeauxJUG-Maven 3.x, will it lives up to its promises"

  1. 1. Will it live up to its promises?APACHE MAVEN 3.X
  2. 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. 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 projects 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. 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. 5. Choose your way of thinkingConventions approach Scripting approach 5
  6. 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. 7. With scripts oriented buildsYou can have But often you have(if you have good skills) (moreover after years …) 7
  8. 8. With MavenWe dream to deliver But yesterday we too often had(Maven 3.x) (Maven 2.x) 8
  9. 9. Apache Maven 3.xBACKWARD COMPATIBILITY 9
  10. 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. 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. 12. Maven 3.0.x ITs 674 12
  13. 13. Apache Maven 3.xPERFORMANCES 13
  14. 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. 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. 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. 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. 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
  19. 19. Performances – mvnsh 19
  20. 20. Apache Maven 3.xEXTENSIBILITY 20
  21. 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. 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
  23. 23. Apache Maven 3.xROBUSNESS 23
  24. 24. Robusness - Criticisms•  Builds aren’t predictable•  Errors are difficult to diagnose 24
  25. 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. 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. 27. Robusness – Artifacts management•  No more support for legacy repository layout for Maven 1.0•  SNAPSHOTs are always deployed with timestamps 27
  28. 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. 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
  30. 30. Apache Maven 3.xPOM 30
  31. 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. 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. 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. 34. Apache MavenQUESTIONS ? 34
  35. 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. 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. 37. Apache MavenTO GO FURTHER …
  38. 38. Apache MavenCOMMUNITY 38
  39. 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. 40. Apache Maven Web Site 40
  41. 41. DowloadsPer month downloadshttp://people.apache.org/~vgritsenko/stats/ projects/maven.html 41
  42. 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
  43. 43. Commit Statistics•  In light blue the number of active commiters 43
  44. 44. Apache MavenDOCUMENTATIONS 44
  45. 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. 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. 47. Books•  Sonatype / O’Reilly : » The Definitive Guide » http:// www.sonatype.com/ books » Free download » Available in several languages 47
  48. 48. Books•  Apache Maven 2 Effective Implementation » Brett Porter, Maria Odea Ching » https:// www.packtpub.com/ apache-maven-2- effective- implementation/book 48
  49. 49. Books•  Exist Global » Better builds with Maven » http:// www.maestrodev.com /better-build-maven » Free download 49
  50. 50. Apache MavenSUPPORT 50
  51. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×