Apache Maven 3.xWILL IT LIVE UP TO ITS PROMISES?                                     Arnaud Héritier                      ...
ARNAUD HÉRITIER                                   −  eXo - Software Factory                                        Manager...
1   −  Why Apache Maven?2   −  Apache Maven 3.x, Where are we, where are we going to …        −  Community, Resources,    ...
Why ?A PA C H E M AV E N ( 3 . X )
DEFINITION−  Apache Maven is a software project management and  comprehension tool.−  Based on the concept of a project ob...
H I S T O RY−  Initiated in 2001 by Jason Van Zyl in Alexandria, an Apache Jakarta project,−  Moved to Turbine few months ...
C H O O S E Y O U R WAY O F T H I N K I N GConventions approach                      Scripting approach                www...
C O M P E T I T O R S ( I N J AVA L A N D )−  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…−  Script oriented   −  You can do...
WITH SCRIPTS ORIENTED BUILDSYou can have                                But often you have(if you have good skills)       ...
W I T H M AV E NWe dream to deliver                       But yesterday we too often(Maven 3.x)                           ...
Where are we ?Where are we going to ?A PA C H E M AV E N 3 . X
Apache Maven 3.xCOMMUNITY                   www.exoplatform.com - Copyright 2012 eXo Platform                             ...
USERS MAILING LIST−  Blue :                                    −  users@maven.apache.org    −  Number of subscribers      ...
DEV MAILING LIST−  Blue :                                    −  dev@maven.apache.org    −  Number of subscribers          ...
A PA C H E M AV E N W E B S I T E               www.exoplatform.com - Copyright 2012 eXo Platform                         ...
A PA C H E M AV E N W E B S I T E               www.exoplatform.com - Copyright 2012 eXo Platform                         ...
DOWLOADS−  Per month downloads−  http://people.apache.org/~vgritsenko/stats/projects/maven.html                  www.exopl...
RELEASES (LAST 2 MONTHS)−  Plugins                                      −  Libraries   −    Compiler 2.5.1 (2012-06-04)   ...
THE COMMUNITY−  ~20 PMC, ~20 committers, ~20 emeritus−  A community less isolated : more interactions with Eclipse,  Jetty...
Apache Maven 3.xRESOURCES                   www.exoplatform.com - Copyright 2012 eXo Platform                             ...
BOOKS−  Nicolas De loof  Arnaud Héritier   −  Published by Pearson   −  Collection Référence   −  Based on our own      ex...
BOOKS−  Sonatype / O’Reilly :   −  The Definitive Guide   −  http://www.sonatype.com/      books   −  Free download   −  A...
BOOKS−  Apache Maven 2 Effective  Implementation   −  Brett Porter, Maria Odea      Ching   −  https://www.packtpub.com/  ...
BOOKS−  Exist Global   −  Better builds with Maven   −  http://www.maestrodev.com/      better-build-maven   −  Free downl...
MANY OTHERS RESOURCES−  Many companies are providing trainings and expertise−  Many resources on internet (blogs, ….)−  Th...
Apache Maven 3.xBACKWARD COMPATIBILITY                   www.exoplatform.com - Copyright 2012 eXo Platform                ...
B A C K WA R D C O M PAT I B I L I T YCRITICISMS−  Migration from Maven 1 to 2 was impossible. Everything had to  be re-do...
B A C K WA R D C O M PAT I B I L I T Y−  Near to 700 integration tests−  Tested for several months on a large set of OSS p...
M AV E N 3 . 0 . X I T S                                674                  www.exoplatform.com - Copyright 2012 eXo Plat...
Apache Maven 3.xPERFORMANCES                   www.exoplatform.com - Copyright 2012 eXo Platform                          ...
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  performances (IO, CPU, Memory, Network …)−  Startup and ...
P E R F O R M A N C E S – PA R A L L E L B U I L D S−  Parallel builds   −  An execution plan is predefined at startup to ...
PERFORMANCES - PLUGINS−  Many improvements in plugins   −  In Surefire/Failsafe to propose various strategies to execute t...
Apache Maven 3.xEXTENSIBILITY                   www.exoplatform.com - Copyright 2012 eXo Platform                         ...
EXTENSIBILITY - CRITICISMS−  It is difficult and time consuming to extend Maven (write  plugins)   −  Many unknown technol...
EXTENSIBILITY−  New APIs to improve abstraction of underneath implementation   −  Aether : to manage artifacts and reposit...
Apache Maven 3.xROBUSTNESS                   www.exoplatform.com - Copyright 2012 eXo Platform                            ...
ROBUSTNESS - CRITICISMS−  Builds aren’t predictable−  Errors are difficult to diagnose                   www.exoplatform.c...
R O B U S T N E S S - VA L I D AT I O N S−  Many more validations in POMs (warnings or errors)   −  Missing plugins versio...
ROBUSTNESSA R T I FA C T S M A N A G E M E N T−  Parent POMs prefer to resolve from repositories   −  Version less parent ...
ROBUSTNESSA R T I FA C T S M A N A G E M E N T−  No more support for legacy repository layout for Maven 1.0−  SNAPSHOTs ar...
ROBUSTNESSPLUGINS MANAGEMENT−  version is by default RELEASE and no more SNAPSHOT   −  Affects command-line invocation−  P...
ROBUSTNESS – SITE PLUGIN−  Site is now completely extracted from core   −  It has its own lifecycle   −  reporting section...
Apache Maven 3.xPOM                   www.exoplatform.com - Copyright 2012 eXo Platform                                   ...
CRITICISMS−  XML, we don’t like it−  POM is too verbose−  POM v4 didn’t evolve last 5 years   −  When will you add new com...
POM−  No change in POM syntax for 3.0.x−  Changes will occur in 3.x versions   −  New model with a new version   −  Only n...
TeslaW H AT I S I T ?
W H AT ! Y O U F O R K E D A PA C H E M AV E N ?               www.exoplatform.com - Copyright 2012 eXo Platform          ...
A F O R K O F A PA C H E M AV E N ?−  “The build portion of Tesla are extensions to Maven. The small  differences in the c...
W H AT I S T E S L A ?−  A new project leaded by Jason Van Zyl−  Sources are on Github : https://github.com/etesla−  Licen...
F E AT U R E S−  Local repository:    −  Concurrent Local Repository    −  Automatic Local Snapshot Purging    −  Split Lo...
A U T O M AT I C L O C A L S N A P S H O T P U R G I N G                 www.exoplatform.com - Copyright 2012 eXo Platform...
P O LY G L O T S U P P O R T                www.exoplatform.com - Copyright 2012 eXo Platform                             ...
TESLA SHELL          www.exoplatform.com - Copyright 2012 eXo Platform                                                    ...
TESLA SHELL          www.exoplatform.com - Copyright 2012 eXo Platform                                                    ...
Thank YouQUESTIONS?
LICENCE ET COPYRIGHTS−  Photos and logos belong to their respective authors/owners−  Various ideas are coming from the exc...
LICENCE ET COPYRIGHTS−  Content under Creative Commons 3.0   −  Attribution — You must attribute the work in the manner sp...
Upcoming SlideShare
Loading in …5
×

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

1,644 views
1,549 views

Published on

Maven 3.x @ Lava Java Users Group - June 14th, 2012

Apache Maven, the project, the community, the product, ...

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

No Downloads
Views
Total views
1,644
On SlideShare
0
From Embeds
0
Number of Embeds
251
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

  1. 1. Apache Maven 3.xWILL IT LIVE UP TO ITS PROMISES? Arnaud Héritier Software Factory Manager L AVA J U G - J U N E 2 0 1 2
  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 www.exoplatform.com - Copyright 2012 eXo Platform 2
  3. 3. 1 −  Why Apache Maven?2 −  Apache Maven 3.x, Where are we, where are we going to … −  Community, Resources, −  Backward Compatibility, Performances, Extensibility, Robustness, Pom3 −  Tesla −  What is it ?4 −  Questions www.exoplatform.com - Copyright 2012 eXo Platform 3
  4. 4. Why ?A PA C H E M AV E N ( 3 . X )
  5. 5. DEFINITION−  Apache Maven is a software project management and comprehension tool.−  Based on the concept of a project object model (POM) −  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 ? www.exoplatform.com - Copyright 2012 eXo Platform 5
  6. 6. H I S T O RY−  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.−  2.0 released in September 2005−  3.0 released in October 2010 −  3.0.4 – January 2012 www.exoplatform.com - Copyright 2012 eXo Platform 6
  7. 7. C H O O S E Y O U R WAY O F T H I N K I N GConventions approach Scripting approach www.exoplatform.com - Copyright 2012 eXo Platform 7
  8. 8. C O M P E T I T O R S ( I N J AVA L A N D )−  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…−  Script oriented −  You can do what you want !−  Reuse many of 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 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 L www.exoplatform.com - Copyright 2012 eXo Platform 8
  9. 9. WITH SCRIPTS ORIENTED BUILDSYou can have But often you have(if you have good skills) (moreover after years …) www.exoplatform.com - Copyright 2012 eXo Platform 9
  10. 10. W I T H M AV E NWe dream to deliver But yesterday we too often(Maven 3.x) had (Maven 2.x) www.exoplatform.com - Copyright 2012 eXo Platform 10
  11. 11. Where are we ?Where are we going to ?A PA C H E M AV E N 3 . X
  12. 12. Apache Maven 3.xCOMMUNITY www.exoplatform.com - Copyright 2012 eXo Platform 12
  13. 13. USERS MAILING LIST−  Blue : −  users@maven.apache.org −  Number of subscribers −  Traffic statistics cover a total−  Red : of 2338 days (>6y). −  Number of messages per day −  Current subscribers: 1902 −  Total posts: 95442 −  Mean posts per day: 40.82 −  http://pulse.apache.org/ www.exoplatform.com - Copyright 2012 eXo Platform 13
  14. 14. DEV MAILING LIST−  Blue : −  dev@maven.apache.org −  Number of subscribers −  Traffic statistics cover a total−  Red : of 2338 days (>6y). −  Number of messages per day −  Current subscribers: 676 −  Total posts: 63215 −  Mean posts per day: 27,04 −  http://pulse.apache.org/ www.exoplatform.com - Copyright 2012 eXo Platform 14
  15. 15. A PA C H E M AV E N W E B S I T E www.exoplatform.com - Copyright 2012 eXo Platform 15
  16. 16. A PA C H E M AV E N W E B S I T E www.exoplatform.com - Copyright 2012 eXo Platform 16
  17. 17. DOWLOADS−  Per month downloads−  http://people.apache.org/~vgritsenko/stats/projects/maven.html www.exoplatform.com - Copyright 2012 eXo Platform 17
  18. 18. RELEASES (LAST 2 MONTHS)−  Plugins −  Libraries −  Compiler 2.5.1 (2012-06-04) −  Tools 3.0 (2012-05-31) −  Changes 2.7.1 (2012-05-10) −  Runtime 1.0-alpha-3 −  Shade 1.7 (2012-06-01) (2012-05-28) −  Compiler 2.5 (2012-05-27) −  Testing 2.0 (2012-05-27) −  Clean 2.5 (2012-05-26) −  Release 2.3.1 (2012-05-25) −  Enforcer 1.1 (2012-05-14) −  Invoker 1.6 (2012-05-24) −  SCM 1.7 (2012-04-29) −  Remote Resources 1.3 −  Doxia (base) 1.3 (2012-04-13) (2012-05-11) −  Doxia Sitetools 1.3 −  Release 2.3 (2012-05-11) (2012-04-17) −  Site 3.1 (2012-04-30) −  Changes 2.7 (2012-04-30) −  Compiler 2.4 (2012-04-30) −  Site 2.4 (2012-04-26) www.exoplatform.com - Copyright 2012 eXo Platform 18
  19. 19. THE COMMUNITY−  ~20 PMC, ~20 committers, ~20 emeritus−  A community less isolated : more interactions with Eclipse, Jetty, …−  A new French PMC Chair in few days : Olivier Lamy (Cocorico !!!) www.exoplatform.com - Copyright 2012 eXo Platform 19
  20. 20. Apache Maven 3.xRESOURCES www.exoplatform.com - Copyright 2012 eXo Platform 20
  21. 21. 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 www.exoplatform.com - Copyright 2012 eXo Platform 21
  22. 22. BOOKS−  Sonatype / O’Reilly : −  The Definitive Guide −  http://www.sonatype.com/ books −  Free download −  Available in several languages www.exoplatform.com - Copyright 2012 eXo Platform 22
  23. 23. BOOKS−  Apache Maven 2 Effective Implementation −  Brett Porter, Maria Odea Ching −  https://www.packtpub.com/ apache-maven-2-effective- implementation/book www.exoplatform.com - Copyright 2012 eXo Platform 23
  24. 24. BOOKS−  Exist Global −  Better builds with Maven −  http://www.maestrodev.com/ better-build-maven −  Free download www.exoplatform.com - Copyright 2012 eXo Platform 24
  25. 25. MANY OTHERS RESOURCES−  Many companies are providing trainings and expertise−  Many resources on internet (blogs, ….)−  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−  Mailing lists −  http://maven.apache.org/mail-lists.html−  IRC −  irc.codehaus.org - #maven−  Forums −  developpez.net (In French) −  Stackoverflow www.exoplatform.com - Copyright 2012 eXo Platform 25
  26. 26. Apache Maven 3.xBACKWARD COMPATIBILITY www.exoplatform.com - Copyright 2012 eXo Platform 26
  27. 27. B A C K WA R D C O M PAT I B I L I T YCRITICISMS−  Migration from Maven 1 to 2 was impossible. Everything had to be re-done.−  Updates between 2.x versions and also between 2.0.x weren’t too often without side effects. www.exoplatform.com - Copyright 2012 eXo Platform 27
  28. 28. B A C K WA R D C O M PAT I B I L I T Y−  Near to 700 integration tests−  Tested for several months on a large set of OSS projects−  7 alphas + 3 betas versions−  It’s a revolution under the hood but an evolution for end users www.exoplatform.com - Copyright 2012 eXo Platform 28
  29. 29. M AV E N 3 . 0 . X I T S 674 www.exoplatform.com - Copyright 2012 eXo Platform 29
  30. 30. Apache Maven 3.xPERFORMANCES www.exoplatform.com - Copyright 2012 eXo Platform 30
  31. 31. PERFORMANCES - CRITICISMS−  Maven is slow−  It spends its time to download the world−  Whereas everybody has multicore CPUs, it doesn’t allow to process tasks in parallel www.exoplatform.com - Copyright 2012 eXo Platform 31
  32. 32. PERFORMANCES−  A set of benchmark tools was developed to measure 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 www.exoplatform.com - Copyright 2012 eXo Platform 32
  33. 33. P E R F O R M A N C E S – PA R A L L E L B U I L D S−  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 www.exoplatform.com - Copyright 2012 eXo Platform 33
  34. 34. PERFORMANCES - PLUGINS−  Many improvements in plugins −  In Surefire/Failsafe to propose various strategies to execute tests in // and to order them −  In Compiler to keep loaded the classloader used by Javac −  In Packaging plugins (Assembly, Jar, War, …) by improving performances in low level libraries (plexus …) www.exoplatform.com - Copyright 2012 eXo Platform 34
  35. 35. Apache Maven 3.xEXTENSIBILITY www.exoplatform.com - Copyright 2012 eXo Platform 35
  36. 36. 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 www.exoplatform.com - Copyright 2012 eXo Platform 36
  37. 37. EXTENSIBILITY−  New APIs to improve abstraction of underneath implementation −  Aether : to manage artifacts and repositories−  Classloader partitioning−  Embeddable−  IOC replaced by Guice −  For now (Maven 3.0) a wrapper is hiding the change −  You don’t yet use Guice directly (from plugins for example) www.exoplatform.com - Copyright 2012 eXo Platform 37
  38. 38. Apache Maven 3.xROBUSTNESS www.exoplatform.com - Copyright 2012 eXo Platform 38
  39. 39. ROBUSTNESS - CRITICISMS−  Builds aren’t predictable−  Errors are difficult to diagnose www.exoplatform.com - Copyright 2012 eXo Platform 39
  40. 40. R O B U S T N E S S - VA L I D AT I O N S−  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 www.exoplatform.com - Copyright 2012 eXo Platform 40
  41. 41. ROBUSTNESSA R T I FA C T S M A N A G E M E N T−  Parent POMs prefer to resolve from repositories −  Version less parent will be available in a future 3.x release by using the relativePath element−  Profiles usage consolidation −  No more profiles.xml (incompatible with future polyglot feature) www.exoplatform.com - Copyright 2012 eXo Platform 41
  42. 42. ROBUSTNESSA R T I FA C T S M A N A G E M E N T−  No more support for legacy repository layout for Maven 1.0−  SNAPSHOTs are always deployed with timestamps www.exoplatform.com - Copyright 2012 eXo Platform 42
  43. 43. ROBUSTNESSPLUGINS MANAGEMENT−  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 www.exoplatform.com - Copyright 2012 eXo Platform 43
  44. 44. ROBUSTNESS – SITE PLUGIN−  Site is now completely extracted from core −  It has its own lifecycle −  reporting section in POM becomes useless (moved in configuration) www.exoplatform.com - Copyright 2012 eXo Platform 44
  45. 45. Apache Maven 3.xPOM www.exoplatform.com - Copyright 2012 eXo Platform 45
  46. 46. 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 www.exoplatform.com - Copyright 2012 eXo Platform 46
  47. 47. POM−  No change in POM syntax for 3.0.x−  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 versions−  Mixins to allow to import POM fragments www.exoplatform.com - Copyright 2012 eXo Platform 47
  48. 48. TeslaW H AT I S I T ?
  49. 49. W H AT ! Y O U F O R K E D A PA C H E M AV E N ? www.exoplatform.com - Copyright 2012 eXo Platform 49
  50. 50. A F O R K O F A PA C H E M AV E N ?−  “The build portion of Tesla are extensions to Maven. The small differences in the core I currently have will be contributed back.” - Jason van Zyl−  “It’s fork as long as Apache Maven core differences aren’t proposed to be contributed back AND validated by the Apache Maven team” – Arnaud and others Apache Maven members www.exoplatform.com - Copyright 2012 eXo Platform 50
  51. 51. W H AT I S T E S L A ?−  A new project leaded by Jason Van Zyl−  Sources are on Github : https://github.com/etesla−  License : Eclipse Public License v1.0−  “It is not just about builds. Build, IDE, CI, repository management and provisioning.” - Jason Van Zyl −  It is a set of extensions on top of existing tools : Apache Maven, M2E, Nexus, Hudson, … www.exoplatform.com - Copyright 2012 eXo Platform 51
  52. 52. F E AT U R E S−  Local repository: −  Concurrent Local Repository −  Automatic Local Snapshot Purging −  Split Local Repository−  Polyglot Support−  development: In Apache −  Java 5 Annotation-based API since few weeks too −  JSR-330 (DI) Components in Plugins−  Build Avoidance API−  Several New Extension Points−  TeslaShell−  More to come! www.exoplatform.com - Copyright 2012 eXo Platform 52
  53. 53. A U T O M AT I C L O C A L S N A P S H O T P U R G I N G www.exoplatform.com - Copyright 2012 eXo Platform 53
  54. 54. P O LY G L O T S U P P O R T www.exoplatform.com - Copyright 2012 eXo Platform 54
  55. 55. TESLA SHELL www.exoplatform.com - Copyright 2012 eXo Platform 55
  56. 56. TESLA SHELL www.exoplatform.com - Copyright 2012 eXo Platform 56
  57. 57. Thank YouQUESTIONS?
  58. 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−  Tesla details are coming from Anders Hammar’s presentation for Jfocus 2012 −  http://goo.gl/XNPpQ www.exoplatform.com - Copyright 2012 eXo Platform 58
  59. 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/ www.exoplatform.com - Copyright 2012 eXo Platform 59

×