Chapter 26: Managing Projects with Maven


Overview

Maven started life as a subproject of Turbine (http://jakarata.apache.org/ turbine ), a Web application framework. It was born out of the need of its lead developer, Jason Van Zyl, to easily add in new pieces of functionality to his build process, such as unit testing or source metrics, both of which can be extremely important to a large project. The first iterations used Ant as the build system, but then Maven moved away from Ant to use Jelly as its primary scripting engine to build the plug-in architecture that is there today.

There is currently talk on the mailing list about making plug-ins scriptable with a variety of languages, notably using Groovy or BeanShell with Object-Graph Navigation Language (OGNL). Originally Maven started out as a solution to the multitude of copying tasks required to move Ant files from project to project, and the plethora of dependent JAR libraries that would change on a regular basis. Its primary goal has always been to make it easy for developers to follow agile methods and to make it a little difficult to step out of those methods (like unit testing). Among those goals are the following:

  • Making the build process easy.

  • Providing a uniform build system.

  • Supplying quality project information.

  • Providing clear development process guidelines.

  • Offering guidelines for thorough testing practices.

  • Enabling coherent visualization of project information.

  • Allowing transparent migration to new features.

Maven satisfies these goals and continues to improve its feature set through the plug-in architecture.

start sidebar
Where to Get Maven

Maven is a top-level project hosted by Apache and is available under the Apache License at http://maven.apache.org

Its core plug-ins are part of the initial download and installation. Some projects (such as XDoclet) are hosting their own plug-ins, or you need to build and install other plug-ins yourself. But once installed, plug-ins can be used by any project requiring them, one of the key benefits of Maven. Some additional plug-ins (including a reference to the XDoclet plug-in) can be found at

http://maven.apache.org/reference/plugins/index.html

end sidebar
 

Maven makes it relatively easy to get a new project up and running. If you stick with the defined project layout (which makes a lot of sense), you can have a bare-bones project built with Maven in about half an hour to an hour . You can even have a simple project Web site with all of your reports and related documents up and running within a couple of hours or less, depending on how your documentation is formatted and how much you want to put online.

The following are some of the benefits of Maven:

  • Well-defined project layout: Most Maven projects stick with the basic layout of a project, which makes it easy for you to look for items.

  • Built-in unit testing: Maven's JUnit plug-in provides most of the hooks needed for thorough testing of your project.

  • Built-in code visualization and reporting: Maven has a number of built-in, ready-to-run reports to help your team focus on the project. All of these reports can be integrated into the project Web site build.

  • Integration with other agile technologies: Maven includes plug-ins for code coverage, CVS check-in, code formatting, code style violations, and bug tracking.

  • Project Web sites: Maven has several plug-ins to help you build and maintain your project Web site, including all of the generated project reports like code coverage, source cross reference, JavaDoc, CVS activity, and code style violations.




Professional Java Tools for Extreme Programming
Professional Java Tools for Extreme Programming: Ant, XDoclet, JUnit, Cactus, and Maven (Programmer to Programmer)
ISBN: 0764556177
EAN: 2147483647
Year: 2003
Pages: 228

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