An evening about Maven 9523

An evening about Maven

Recently we had a great session at AMIS about Maven, presented by Jason van Zyl, founder of the Apache Maven project and CTO of Sonatype. He gave us an overview of the new Maven 3 and other projects they are working on. In addition he gave us an insight in the world of Maven. For example, last three years, the usage of the Maven central repository has been doubled every year, with about 4 million unique IP addresses in 2009. They’ve also reorganized and improved the process for uploading artifacts to Maven central to a self service approach, using the staging function of Nexus Professional.

9523We can expect Maven 3.0 to be released at the end of june. Although it will hardly contain any new features, it’s a very exciting release because they’ve overhauled much of the the inner workings, fixed many (about 1400) issues, improved stability, consistency and speed and made sure it’s 100% backwards compatible (the pom’s modelVersion is still 4.0.0). It actually passes more Maven 2 checks than Maven 2 itself ;-). The poms are also better validated, e.g. for duplicate dependencies and missing plugin versions. Plugin handling has been changed and support for Maven 1 repositories and external profiles.xml is removed. Jason almost recommended to use Maven 3 Beta. So basically, what they did was to pave the desire lines.

Only with version 3.1 will we see new features like :

  • Polyglot Maven is a way to leverage Maven through other jvm languages (currently Scala, Groovy, YAML, Clojure, XText and JRuby). Currently it allows for ‘merely’ a different pom format, but these languages will have full access to Maven’s internals and thus have a way to interact with or extend Maven.
  • Maven Shell is a CLI interface for Maven that enabled faster turn-around, and a more intelligent interaction with repositories and projects
  • Mixins provide a way to reuse common configurations. With Maven two this was only possible via inhertance
  • Global exclution of artifacts
  • New settings.xml options like security management, support for repository manager instead of using the mirrorof and better support for multiple environments.
  • New plugin API
  • Target platforms
  • Reworked site and reporting generation
  • Google Guice as ioC container instead of Plexus.

In the second part of the session, Jason talked about the other projects that they are working on, like:

  • Nexus repository manager
  • Mercury, for artifact resolution
  • Tycho, for building Eclipse plugins and OSGI bundles with Maven
  • Proviso, for provisioning, incrementally, run-time environments like Tomcat and JBoss.
  • M2Eclipse provides Maven integration in Eclipse. Version 0.10 has been released and erverybody was urged to upgrade, especially from 0.9.8.
  • Hudson improvements like security, REST access, workflow, provisioning, release management

A last note was about source control. At Sonatype they’ve moved completely to JGit as they consider that superior to Subversion, especially the simple branching and merging together with the Gerrit code review system.

It was a great session with more than 70 people attending. We got a very good overview of the Maven landscape. As a long time Maven user I’m very excited by all these activities so I installed the Beta version of Maven 3 and indeed, my builds run immediately without any changes to the pom (indeed backwards compatible!) but what’s more important, they run about twice as fast. Can’t wait for the release.