Ant Build Tool Interview Questions

15)How to exclude multi directories in copy or delete task?

[code lang=”xml”] [/code]

16)How to use Runtime in ant?

You don’t need to use Runtime etc. Ant have exec task. The class name is You can create the task by using the code in your customized ant Task.

17)How to rearrange my directory structure in my jar/war/ear/zip file? Do I need to unarchive them first?

No, you don’t need to unarchive them first.

  • You don’t need to unzip the files from archive to put into your destination jar/ear/war files.
  • You can use zipfileset in your jar/war/ear task to extract files from old archive to different directory in your new archive.
  • You also can use zipfileset in your jar/war/ear task to send files from local directory to different directory in your new archive.
  • See the follow example: [code lang=”java”] [/code]

    27)Can I change/override ant properties when I use ant-contrib foreach task?

    is actually using a different property space, you can pass any property name/value pair to it. Just use nested tag inside foreach

    What are the advantages of Maven?

  • No need to add jar file in each project
  • Creates right directory structure
  • Builds and deploys the project
  • Apache Ant is a Java library and command-line tool for automating software build processes. It is originated from the Apache Tomcat project in early 2000. It was a replacement for the Make build tool of Unix and was created due to a number of problems with Unixs make. Below we have listed some possible Apache Ant Interview questions and answers for developers who looking for Interview questions on Apache Ant.

    Apache Ant is a Java library and command-line tool for automating software build processes.It drives the processes or instructions described in build files as targets and extension points dependent upon each other.The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks. Source:

    Explain the error “You cannot have two plugin executions with the same ( or missing) elements” in Maven?

    This error message comes when we have run a single plugin more than one time with the same id. We need to give a unique id for each execution.

    Ant is an open source code .It is Java-based build tool sponsored by Apache Software Foundation. It is a program for putting all the pieces of a program together. A simple definition might state that “Ant is a Java-based build tool from Apache Software Foundation”.

    Open: Ant is an open-source project available under the Apache license. Therefore, its source code can be downloaded and modified.

    Additionally, Ant uses XML build files which make its development easy.

    Cross Platform: Use of XML along with Java makes Ant makes it the perfect solution for developing programs designed to run or be built across a range of different operating systems.

    Extensible: New tasks are used to extend the capabilities of the build process, while build listeners are used to help hook into the build process to add extra error tracking functionality.

    Integration: As Ant is extensible and open, it can be integrated with any editor or development environment easily.

    Apache Ant – What is it? Explained in easy way.. []

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *