• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
LavaJUG-Maven 3.x, will it lives up to its promises
 

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

on

  • 1,464 views

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

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

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

Statistics

Views

Total Views
1,464
Views on SlideShare
1,234
Embed Views
230

Actions

Likes
1
Downloads
15
Comments
0

4 Embeds 230

http://www.lavajug.org 205
http://lavajug.org 22
https://si0.twimg.com 2
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

    • 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
    • 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
    • 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
    • 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 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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 12
    • 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
    • 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
    • A PA C H E M AV E N W E B S I T E www.exoplatform.com - Copyright 2012 eXo Platform 15
    • A PA C H E M AV E N W E B S I T E www.exoplatform.com - Copyright 2012 eXo Platform 16
    • DOWLOADS−  Per month downloads−  http://people.apache.org/~vgritsenko/stats/projects/maven.html www.exoplatform.com - Copyright 2012 eXo Platform 17
    • 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
    • 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
    • Apache Maven 3.xRESOURCES www.exoplatform.com - Copyright 2012 eXo Platform 20
    • 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
    • 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
    • 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
    • BOOKS−  Exist Global −  Better builds with Maven −  http://www.maestrodev.com/ better-build-maven −  Free download www.exoplatform.com - Copyright 2012 eXo Platform 24
    • 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
    • Apache Maven 3.xBACKWARD COMPATIBILITY www.exoplatform.com - Copyright 2012 eXo Platform 26
    • 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
    • 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
    • M AV E N 3 . 0 . X I T S 674 www.exoplatform.com - Copyright 2012 eXo Platform 29
    • Apache Maven 3.xPERFORMANCES www.exoplatform.com - Copyright 2012 eXo Platform 30
    • 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
    • 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
    • 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
    • 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
    • Apache Maven 3.xEXTENSIBILITY www.exoplatform.com - Copyright 2012 eXo Platform 35
    • 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
    • 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
    • Apache Maven 3.xROBUSTNESS www.exoplatform.com - Copyright 2012 eXo Platform 38
    • ROBUSTNESS - CRITICISMS−  Builds aren’t predictable−  Errors are difficult to diagnose www.exoplatform.com - Copyright 2012 eXo Platform 39
    • 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
    • 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
    • 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
    • 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
    • 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
    • Apache Maven 3.xPOM www.exoplatform.com - Copyright 2012 eXo Platform 45
    • 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
    • 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
    • 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 49
    • 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
    • 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
    • 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
    • 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
    • P O LY G L O T S U P P O R T www.exoplatform.com - Copyright 2012 eXo Platform 54
    • TESLA SHELL www.exoplatform.com - Copyright 2012 eXo Platform 55
    • TESLA SHELL www.exoplatform.com - Copyright 2012 eXo Platform 56
    • Thank YouQUESTIONS?
    • 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
    • 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