top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between Maven and ANT in Java?

+1 vote
500 views
What is the difference between Maven and ANT in Java?
posted Oct 24, 2016 by Pooja

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Ant and Maven both are build tools provided by Apache. The main purpose of these technologies is to ease the build process of a project.

There are many differences between ant and maven that are given below:

Ant

Ant doesn't has formal conventions, so we need to provide information of the project structure in build.xml file.
Ant is procedural, you need to provide information about what to do and when to do through code. You need to provide order.
There is no life cycle in Ant.
It is a tool box.
It is mainly a build tool.
The ant scripts are not reusable.
It is less preferred than Maven.

Maven

Maven has a convention to place source code, compiled code etc. So we don't need to provide information about the project structure in pom.xml file.
Maven is declarative, everything you define in the pom.xml file.
There is life cycle in Maven.
It is a framework.
It is mainly a project management tool.
The maven plugins are reusable.
It is more preferred than Ant.

answer Nov 2, 2016 by Karthick.c
Similar Questions
+2 votes

Ivy offers the possibility to access maven repositories and download artifacts from there. There are only pom files in those repositories and no ivy.xml.

They can be retrieved with an ivy resolver that runs in m2compatible mode.

<ibiblio name="maven2" m2compatible="true"/>

Especially for this Use-case I want to know:

  1. which scopes are available by default and what artifacts will they offer
  2. How is a maven scoped mapped to an ivy conf / configuration?
...