Best tool to replace Apache ant
Author: chszs, reprinted with note. Blog homepage:Http://blog.csdn.net/chszs
Although Apache ant has recently released the latest version 1.9.2, see: http://ant.apache.org/bindownload.cgi
However, Apache ant, after all, is a product a few years ago. Some of its methods, ideas, and ideas have lagged behind the mainstream tools such as Maven.
So which of the following is the best and most suitable building tool to replace ant?
There are three options: Maven, gradle, and buildr.
It is important that the new build tool is compatible with ant's build scripts and custom tasks, so that many projects can be smoothly upgraded. Because Apache ant is the standard for building projects in the early stage, many open-source projects in the early stage were built based on Ant.
Among the above three build tools, gradle can achieve optimal integration with ant. It allows existing ant custom tasks to be imported to the gradle build script without any modification. Gradle tasks can even depend on ant's target, and vice versa. This makes it easy to access the ant attribute.
It is not difficult to migrate any ant project to gradle project, and it has the following advantages:
1. Powerful groovy scripts can be used
2. Easy integration of groovy and Java
3. built-in dependency management
4. Support for plug-in systems
Apache buildr is also a Java project-oriented build tool that provides support for languages including Scala, groovy, and other JVM-running languages. The design philosophy of Apache buildr is simple and intuitive.
One disadvantage of buildr is that to install and use it, you must first install Ruby. Buildr only supports Ruby 1.8.6. Currently, the support for Ruby 1.9.x is out of the development process, not to mention the latest Ruby 2.0. That is to say, buildr lags far behind the development of Ruby in terms of Ruby support.
The other two tools, like buildr, can be integrated with ant and are not as complex as gradle. Maven is not as simple as a script tool like ant or gradle. It is declarative rather than procedural. Therefore, migrating complex ant build scripts to Maven is quite troublesome and often involves the development of custom Maven plug-ins.