Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Ant still the best choice for a Java build tool? [closed]

Tags:

From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why?

like image 266
mawaldne Avatar asked Oct 11 '08 14:10

mawaldne


People also ask

Is Ant still used in Java?

Apache Ant, which debuted in 2000, is the oldest, still widely used Java build tool. Apache Ant has built-in support for sending automatic emails to notify developers about build status. You can configure other Java build tools, including Gradle and Maven, to send emails as well.

Should I use Ant or Maven?

While Ant gives flexibility and requires everything to be written from scratch, Maven relies on conventions and provides predefined commands (goals). Simply put, Maven allows us to focus on what our build should do, and gives us the framework to do it.

Is Gradle better than Ant?

Gradle is more standardized than Ant in case of flexibility. It is less flexible than Gradle. Gradle supports multi-project build. It does not support multi-project build.


1 Answers

Maven

It is much better than ant because for most common tasks you don't have to write a complicated build.xml, maven has very good defaults and it's all convention over configuration.

It has also a big central repository of libraries and it's very easy to configure it to, like, "use latest stable commons-whatever". Maven will then download the latest stable version for you (no more checking in jars into VCS) and if a new upstream stable version is released, it will download it as well. Of course, it's just as easy to lock it to some specific version should you need that.

It is also well integrated both with Netbeans and Eclipse (m2eclipse plugin) so the IDE honors whatever settings (including dependencies) you declare in the pom.xml file.

There are also some downsides to maven: some plugins are rather poorly documented, integration with both IDEs is not really perfect, and that in different ways, some error messages may be hard to understand.

like image 132
Jacek Szymański Avatar answered Oct 08 '22 04:10

Jacek Szymański