Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LavaJUG-Maven 3.x, will it lives up to its promises
1. Apache Maven 3.x
WILL 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. 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. 1 − Why Apache Maven?
2 − Apache Maven 3.x, Where are we, where are we going to …
− Community, Resources,
− Backward Compatibility, Performances, Extensibility, Robustness, Pom
3 − Tesla
− What is it ?
4 − Questions
www.exoplatform.com - Copyright 2012 eXo Platform
3
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 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 ?
www.exoplatform.com - Copyright 2012 eXo Platform
5
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. C H O O S E Y O U R WAY O F T H I N K I N G
Conventions approach Scripting approach
www.exoplatform.com - Copyright 2012 eXo Platform
7
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. WITH SCRIPTS ORIENTED BUILDS
You can have But often you have
(if you have good skills) (moreover after years …)
www.exoplatform.com - Copyright 2012 eXo Platform
9
10. W I T H M AV E N
We dream to deliver But yesterday we too often
(Maven 3.x) had (Maven 2.x)
www.exoplatform.com - Copyright 2012 eXo Platform
10
11. Where are we ?
Where are we going to ?
A PA C H E M AV E N 3 . X
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. 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. 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. A PA C H E M AV E N W E B S I T E
www.exoplatform.com - Copyright 2012 eXo Platform
16
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
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. 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
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
27. B A C K WA R D C O M PAT I B I L I T Y
CRITICISMS
− 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. 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. M AV E N 3 . 0 . X I T S
674
www.exoplatform.com - Copyright 2012 eXo Platform
29
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. 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. 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. 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
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. 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
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. ROBUSTNESS
A 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. ROBUSTNESS
A 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. ROBUSTNESS
PLUGINS 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. 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
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. 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
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. 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. 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. 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. 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. P O LY G L O T S U P P O R T
www.exoplatform.com - Copyright 2012 eXo Platform
54
55. TESLA SHELL
www.exoplatform.com - Copyright 2012 eXo Platform
55
56. TESLA SHELL
www.exoplatform.com - Copyright 2012 eXo Platform
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
− 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. 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