Preface


What is Maven? The Maven web site (http://maven.apache.org) states the following:

Maven is a software project management and comprehension tool. Based on the concept of a Project Object Model (POM), Maven can manage a project's build, reporting, and documentation from a central piece of information.

While this captures the idea of Maven, it doesn't really explain what Maven is about. Here's another attempt: Maven provides a rich development infrastructure (compilation, testing, reporting, collaboration, and documentation) from a simple description of any Java project. It is an easy way to build a project without having to build a build system.

Maven started as an attempt to simplify and standardize the complex, Ant-based build process used for Jakarta Turbine. As the build system became more baroque and the Turbine project split into smaller, more focused components, a need emerged for a tool to describe each subproject and manage dependencies. The complexity of this multiproject Ant build created an ideal environment for a new project management system, and Maven 1 is the product of this natural evolution. Maven is frequently compared to the current build tool of choiceApache Ant. And, while Maven is the clear successor to build systems built around Apache Ant, such a statement tends to cause some controversy... Maven 1 reuses a number of Ant tasks, and when you customize a Maven 1 build, you will end up using the tools that Ant provides. Maven is on a higher conceptual level than Ant; where Ant provides tools such as mkdir and copy, Maven is a build container which provides a common build processa development infrastructure.

Maven captures best practices and codifies a common build process in a way that can be shared across all projects. When you "mavenize" a project, you create a project descriptor which describes the content and form of a project. This description is then used by common plug-ins which compile, test, package, and deploy project artifacts. In other words, you point Maven at your problem, and it takes care of the solution; you tell Maven where your source code resides, and it takes care of the compilation with little interference from you. You tell Maven to create a WAR file or create a JUnit report, and it retrieves the necessary libraries automatically. Maven is part automation, part build process, and part project description. If you are using Maven properly, you'll find yourself spending less time working on your project's build system and more time working on your project's code.

Just as Maven was inspired by the needs of the Jakarta Turbine project, Jakarta Ant was initially created as a part of the Jakarta Tomcat project. Ant spread like wildfire once people realized it had the potential to simplify project builds. Here's a quote from the Apache Ant FAQ (http://ant.apache.org/faq.html) about the spread of Ant in 1999-2000:

Soon thereafter, several open source Java projects realized that Ant could solve the problems they had with Makefiles. Starting with the projects hosted at Jakarta and the old Java Apache project, Ant spread like a virus and is now the build tool of choice for a lot of projects.

When Ant was introduced, it revolutionized the community; Ant went from a novelty to an indispensable utility in the course of a year. Maven is experiencing a similar transition point as developers start to see how much easier it is to develop with a project management tool.


Note: People used to use Makefiles for Java?! Yes, and it wasn't pretty.


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