Andrew Binstock: From Ant to Maven



Email    print   
October 15, 2007 —  (Page 1 of 2)
During the past month, I have been doing what increasing numbers of developers are urging their peers to do: move projects from Ant to Maven 2. In my July 1 column, I discussed my mounting frustrations with Ant (“Moving Past Ant,” www.sdtimes.com/article/column-20070701-04.html). When I finally was no longer motivated to soldier on with Ant’s minimal delivery model, I finally put the time in to make the switch to Maven. I’m glad I did. There is lots to like about Maven.

Most visible is that Maven has a vision of a build cycle that consists of a sequence of commonly performed build steps. You indicate what you want done in certain steps, and that’s it. Maven has intelligent default behavior for the other steps, so the results tend to be what you expect. This build model enables Maven to embrace the paradigm of “convention over configuration” that was made famous by Ruby on Rails. With Maven, you roll with the basic model, making only small tweaks for project-dependent steps, rather than configuring every step in detail for Ant. Ant is more like the venerable make tool, which simply follows orders and serves as a meta-level task execution language.

The Maven model also has a useful end result in addition to the built project: a Web site with the reports generated by the various build steps. Maven creates a Web site with menu picks that reflect not only reports on standard operations, but any other documents or reports you request. For example, place a JDepend command in Maven to see the dependencies between packages in your Java project, and the results are displayed in an HTML report on your Maven Web site. Because of this, your project Web site as created by Maven always reflects the latest status of your project. Stick it on your developer intranet, and all team members know exactly where things stand.

This comes tantalizingly close to what is thought of as continuous integration (CI). However, it lacks a few crucial elements that CI provides: It does not monitor source-code repositories for any modification that could start up the build process, and it does not keep historical data on previous builds—the generated Web site is a single time slice. But if you add monitoring and history to Maven, you would have a barebones CI system. Because of this proximity, most CI systems support Maven 2.




Pages 1 2 


Share this link: http://sdt.bz/31223
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Integration Watch: Maven goes commercial
Sonatype, Jason van Zyl's company, has expanded its array of software and support products. The result is a more comprehensive set of tools for Java developers and lowers the usual risks involves with free and open-source software Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb