The Future: Maven 2


At the time of this writing, the initial technology preview for Maven 2 is available from the Maven web site (http://maven.apache.org). Although Maven 2 shares lots of concepts with Maven 1, it is a complete rewrite, and builds created for Maven 1 will not be compatible with Maven 2. Maven 1 plug-ins will not be directly compatible with Maven 2 plug-ins, and Jelly has been abandoned as a core scripting language. There will be migration paths, though. This book is peppered with references to Maven 2 and how Maven 2 differs from Maven 1. New features in Maven 2 include:

  • Performance


    Fewer dependencies

    Maven's core drops the dependency on Jelly and Ant.


    Embeddable

    Maven 2 is designed to be embedded in other tools.


    Less Jelly, more Java

    Writing more logic in Java will mean faster execution.

  • Lifecycle mechanism and definition


    Defined lifecycle

    Maven 2 defines a project's lifecycle, and plug-ins hook onto a particular part of that lifecycle. Instead of defining preGoals, postGoals, or prereqs, plug-ins tell Maven where they fit into the defined lifecycle.


    Multiproject aware

    Maven will work with multiple projects by default, and it will be easier to create multiproject builds.

  • Dependency management


    Repository improvements

    Maven 2 will support a new, more-scaleable repository layout (explained in Section 1.1).


    Snapshots

    The mechanism for obtaining SNAPSHOT dependencies will be more configurable. You will be able to configure how often Maven checks for a new snapshot.


    Transitive dependencies

    Maven 2 will allow you to depend on a dependency's dependencies... confusing? If project A depends on artifact B, which in turn depends on artifact C, Maven 2's transitive dependency management will automatically retrieve and include artifact C in project A's dependencies.

  • Customization and plug-ins


    No properties files or maven.xml files

    Behavior is now customized in the POM, which will be stored in pom.xml.


    No Jelly script

    Jelly script will no longer be the core scripting language for goals and plug-ins. For performance reasons, plug-in developers will be encouraged to write plug-ins in Java. Support for scripting languages such as Groovy and Marmalade will be available. A Jelly bridge will be available in Marmalade to easily port existing Maven 1 builds to Maven 2.

Many developers and businesses tend to wait anywhere from a few months to a few years to adopt a new project, and Maven 1 will remain in use for a long time as the feature set of Maven 2 is solidified and Maven 2 has time to prove itself. A final release of Maven 2 should be available in August or September of 2005, and plug-ins will be ported to Maven 2 as developers move to the 2.0 release. Please note that the previous sentence was an estimate; providing a solid date for the release of a software project is an impossible feat, but based on progress at the time of this writing, Maven 2 is well within reach.



Maven. A Developer's Notebook
Maven: A Developers Notebook (Developers Notebooks)
ISBN: 0596007507
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net