I use Maven for POC (Proof Of Concept) and Demo projects and ANT build files in legacy applications (those already using ANT build files). For new projects which are through with POC stage, it is best to go for both with ANT acting as complementary to MAVEN in performing tasks which require more control.
- The major difference between the two is that while ANT allows minute level control, maven recommends for best practices to be used.
- There is a specific project structure recommended by Maven but with ANT, the choice of project structure is left to the developer.
- Maven downloads the required standard jar files (like Spring, Struts, JUnit, Apache commons and JDOM) on local machine and reuses them without the developer ever needing to specifically download and add them to class path. With ANT, we need to download the required jar files, create variables pointing to the path of these jar files and then add these path variables to the classpath.
- There is a sense of reuse with Maven, major blocks of code can be directly used from one maven build file (pom.xml) to another. However with ANT, a lot of changes are required to be made to make it suite another project.
- There are whole lot of plugins available for Maven ranging from running unit tests, building project war/ear and generating javadoc.
- ANT has been present for quite long time now and many projects in the maintenance phase are using ANT build scripts. The result is that lot of developers are familiar with ANT than Maven. For beginners, learning ANT is much simpler than MAVEN because of the fact that ANT uses the same terminologies used in normal applications without any build tool.
No comments:
Post a Comment