views:

110

answers:

3

While similiar questions have been asked, this one's focused on which is best/easiest to teach.

I'm giving a weekly tutorial at my university focusing on data structures and algorithms. Fromn time to time I introduce tools which may prove helpful in future projects like JUnit, Mercurial, Eclipse etc.. I plan to show them some kind of build tool but I'm not sure which one to choose. I by myself have very little knowledge about build tools, except a little experience in using make. It's more the concept of a build tool I want to show them, not a special tool per se. Which would be the most easiest/future proof/whatever tool to show them?

I've read a little bit about Gradle, which looks nice, but so far I think Ant could be a good choice (it's a Java course I'm giving).

+7  A: 

Ant is more likely to be used in their future employment. You may consider Maven, if you want to go through the problem of complex (and/or remote) dependency in projects

Marc
I can only give them a small introduction (that is, 3-5 hours), and I'm affraid this is maybe a little short to introduce Maven to them.
Helper Method
+1 for maven. Comparitively, Ant is low level, and you have to code quite a bit just get your project structure compiled and zipped into a jar. With maven, run the arcetype:generate to produce a project structure and you're away. You can produce a jar in less than a minute. Then you can focus on multi project builds and dependencies. IMO, far more useful in practice. Ant has it's uses, bit I consider it plumbing and fine detail, and can be learnt by looking through the ant reference.
mdma
+1 for mave, at the moment at work we are migrating from ant-based tool called japro, to maven. I personally think that it will be better to introduce to them a newer technology.
Leni Kirilov
+5  A: 

You could give a brief introductory talk on make just to get the concept across of what a build tool is for and what problem it solves. I'd then focus most of the talk on Ant because it's a lot more common in Java development. Showing two tools will give you the opportunity to compare and contrast them. You could end the talk with a list of other build tools that are in common use, and maybe briefly discuss the strengths of each one.

Bill the Lizard
+1 I like the idea of comparing two build tools.
Helper Method
+6  A: 

I will recommend Ant.

Just learn the basics with Ant. You can also show them an Eclipse project you're using and right-click on it and click export. Then write Ant buildfiles and export the Ant file Eclipse are using internally. Quite nice and can work for many as a good starting point.

You can also mention that Ant together with Ivy can handle dependencies quite similar to Maven.

And it's quite easy to write your own Ant tasks in Java.

Espen