15)How to exclude multi directories in copy or delete task?
16)How to use Runtime in ant?
You don’t need to use Runtime etc. Ant have exec task. The class name is org.apache.tools.ant.taskdefs.ExecTask. 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.
See the follow example: [code lang=”java”]
27)Can I change/override ant properties when I use ant-contrib foreach task?
What are the advantages of Maven?
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: http://ant.apache.org/
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.