Apache ANT Basics
- ANT - Build Files
- ANT - Property Task
- ANT - Property Files
- ANT - Data Types
- ANT - Building Projects
- ANT - Build Documentation
- ANT - Creating JAR files
- ANT - Create WAR Files
- ANT - Packaging Applications
- ANT - Deploying Applications
Apache ANT Advanced
Apache ANT Useful Examples
- ANT - Using Token
- ANT - Using Command Line Arguments
- ANT - Using If Else arguments
- ANT - Custom Components
- ANT - Listeners and Loggers
Apache ANT Useful Resources
Ant Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Ant. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is correct about ANT?
A - Ant is good at automating complicated repetitive tasks.
B - Ant comes with a big list of predefined tasks.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following is true about target?
A - Targets can have dependencies on other targets.
Answer : C
Explanation
Targets can have dependencies on other targets. For example, a deploy target may have a dependency on the package target, the package target may have a dependency on the compile target and so forth. Dependencies are denoted using the depends attribute.
Q 3 - Which of the following property defines the version of Java installation, Ant is using?
Answer : B
Explanation
ant.java.version - The version of the JDK that is used by Ant.
Q 4 - Which of the following property defines the base directory of current project?
Answer : C
Explanation
basedir - The basedir of the build, as specified in the basedir attribute of the project element.
Q 5 - Which of the following is correct about patternset data type?
A - A pattern set is a pattern that allows to filter files based on certain patterns.
B - A pattern set is a pattern that allows to filter folders based on certain patterns.
Answer : C
Explanation
A pattern set is a pattern that allows to filter files or folders easily based on certain patterns.
Q 6 - Which of the following is correct about patternset data type?
A - The patternset can be reused with a fileset.
Answer : A
Explanation
The patternset can be reused with a fileset.
Q 7 - Which of the following is correct about default project structure?
A - The JSPs are stored in the jsp folder.
B - The third party jar files are stored in the lib folder.
C - The java class files are stored in the WEB-INF\classes folder.
Answer : D
Explanation
All of the above options are correct.
Q 8 - Which of the following task is used to create a war file?
Answer : A
Explanation
war task can be used to create a war file.
Q 9 - Which of the following is correct about keepcompression attribute of jar task?
A - Advises Ant to compress the file as it creates the JAR file.
Answer : B
Explanation
keepcompression - While the compress attribute is applicable to the individual files, the keepcompression attribute does the same thing, but it applies to the entire archive.
Q 10 - Which of the following is correct about jvm property of junit task?
A - Represents command used to invoke the JVM.
Answer : C
Explanation
jvm - Command used to invoke the JVM. This is ignored when fork is disabled.