Steve Loughran’s Ant in Action is an upcoming book to pay attention to. Why? I don’t have numbers, but i wouldn’t be surprised if a majority of Java programmers still use Ant every single day. Steve blogged about the upcoming book 4 days ago, but a few things caught my attention:
- “Libraries are managed with Ivy 1.4.1. Pulling down artifacts, sharing across projects.”
- “I’ve chosen Luntbuild over CruiseControl for the continous integration server. CruiseControl is a very high-touch tool, and it doesn’t let me chain work across projects the way Luntbuild, Bamboo and the like can do.”
- “Deployment with SmartFrog. We look at how to do do a complete deployment of database, app server and applications, with JDBC driver installation and all the other details needed to bring up a full functional application server.”
- “imports, macros, and presets”
New Stuff: Some links
- Luntbuild - automates builds, used to achieve continuous integration. an alternative to CruiseControl and Continuum. There is a free version, but there is also a professional version.
- SmartFrog - A project from Hewlett Packard Labs in Bristol, UK. configuration, distribution, and ignition (see below)
- Ivy (now in the Apache Incubator) - Ivy is a “dependency manager”. It will bring something like Maven’s dependency management to an Ant build (but it also isn’t Ant specific). you define your There is also an Ivy Repository which contains Ivy XML files that describe a software artifact and its dependencies (example Commons HttpClient 3.0)
What is SmartFrog?
Here’s an excerpt from the HP site:
SmartFrog is a technology for describing distributed software systems as collections of cooperating components, and then activating and managing them.
In other words, it is a language for describing how software components are configured and deployed. For more info, also see this PDF from HP Labs: SmartFrog: Configuration and Automatic Ignition of Distributed Applications by Goldsack, et al. This technology looks very interesting, and it could help people who need to automate the process of deploying an application to a complex production network. I havent’ used SmartFrog, but I plan to start looking into it ASAP. Forgive the Rails references, but maybe SmartFrog can recreate the ease of Capistrano in Rails.
Wait? What about Maven?
I’ve blogged about Maven, i use Maven everyday, but there are more than a few projects that I maintain that still need to use Ant. They need to use Ant because Ant is better suited to the problem at hand. Let’s say you have a project that needs to product multiple artifacts, perform target platform search and replace, invoke a C compiler, and produce a DEB. I *could* convince all of the people I work with to port some Ant build to a collection of Maven plugins in various states (the DEB plugin needs work, the project doesn’t really conform to “the Maven way”). Or, I could help them realize the same benefits using the tool they are familiar with. Half the time I’m helping people move to Ant, but if a project has specific requirements and a highly customized build, I recommend exactly the approach Steve advocates. “imports, macros, and presets” + “Ivy” - you’ll achieve a similar result to Maven.
If you are looking at Ivy, I’d also recommend looking at the Antlib for Maven 2.0. These Ant tasks provide transitive dependency management plus the ability to publish artifacts to the Maven Repository. I might be showing my bias here, but, IMO, if you are not publishing your (open source) project’s artifacts to the Maven repository you are limiting your audience.
Which approach is better? You decide; it is a matter of style, but know that both communties benefit from the ongoing dialog, and that I’m working on a project that is about 60% Maven and 40% Ant. I’m using Maven to kick off those projects that are a better fit in Ant, and I’d suggest that you not become a zealot either way. I prefer Maven for some projects, Ant for others, and I don’t see a conflict. Maven vs. Ant is a religious war that never needed to happen.
Hyping a Manning book? What gives?
The world’s big enough for more than one technical book publisher. Steve’s a smart guy, and his book is a good one? Don’t think I’m going out and buying up all the Manning books, I still prefer O’Reilly titles.
- Comparison between Ivy and Maven2 from the Ivy Project
- Greg Luck has a good analysis of the decision process, whether to go with Ivy, Maven Antlib + Ant, or Maven 2.0.
- A balanced, but biased, opinion “Ant+Ivy vs. Maven: my biased opinion” from the creator of Ivy.