Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Can somebody please tell me in simple words what exactly is ant build file and maven build file?

share|improve this question

2 Answers 2

They are XML files that describe how to build and package software (usually Java software).

Ant files are used by the Ant tool, which provides more flexible, free-form builds. An Ant build file is much like a program in its own right (only encoded as verbose XML).

POM files are used by Maven, which has a different philosophy and imposes more structure. The Maven approach is more declarative than Ant. Writing a Maven build is less like writing a procedural program to build the software.

share|improve this answer
    
So basically, they are sort of a template for us to build on...they do not provide any ready-made functionality! right? –  shahensha Dec 22 '10 at 11:43
1  
The tools provide the functionality (e.g. compilation, archiving, running unit tests) and the XML files define how this functionality is used. –  Dan Dyer Dec 22 '10 at 11:46
    
Suppose I am developing a Struts2 Web app...then how will they help me? –  shahensha Dec 23 '10 at 5:58

They're just like any other build files (NAnt, make, ...).

They describe the steps taken to produce some kind of artifact - an executable file, a test run, etc.

The build file will describe how to create a clean build environment, what to compile, where the dependencies are that you need to compile, where to put the executables, DLLs, and the like, any additional programs you need to execute (like running your testrunner on your project, or instrumenting your code so a coverage tool can analyse your test coverage).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.