Ant Mock Test



This section presents you various set of Mock Tests related to Ant. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Ant Mock Test

Q 5 - Which of the following task is used to create a jar file?

A - jar

B - jar-create

C - archive

D - None of the above.

Answer : A

Explanation

jar task can be used to create a jar file.

Q 6 - Which of the following task is used to create a war file?

A - war

B - war-create

C - archive

D - None of the above.

Answer : A

Explanation

war task can be used to create a war file.

Q 7 - Which of the following task is used to create a ear file?

A - ear

B - ear-create

C - archive

D - None of the above.

Answer : A

Explanation

ear task can be used to create a ear file.

Q 8 - Which of the following attribute refers to base directory for the output JAR file?

A - base

B - basedir

C - base-dir

D - None of the above.

Answer : B

Explanation

basedir - The base directory for the output JAR file. By default, this is set to the base directory of the project.

Answer : A

Explanation

Compress - 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 11 - Which of the following attribute refers to name of the output JAR file?

A - dest

B - destfile

C - dest-file

D - None of the above.

Answer : B

Explanation

destfile - The name of the output JAR file.

Answer : A

Explanation

Excludes - Advises Ant to not include comma separated list of files in the package.

Answer : A

Explanation

Excludes - Advises Ant to not include pattern specified list of files in the package.

Q 14 - Which of the following attribute refers of path of web.xml in war task?

A - webxml

B - lib

C - classes

D - None of the above.

Answer : A

Explanation

webxml - Path to the web.xml file.

Q 15 - Which of the following attribute refers of path of WEB-INF\lib in war task?

Q 15 - Which of the following attribute refers of path of WEB-INF\lib in war task?

A - webxml

B - lib

C - classes

D - None of the above.

Answer : B

Explanation

lib - A grouping to specify what goes into the WEB-INF\lib folder.

Q 16 - Which of the following attribute refers of path of WEB-INF\classes in war task?

A - webxml

B - lib

C - classes

D - None of the above.

Answer : C

Explanation

classes - A grouping to specify what goes into the WEB-INF\classes folder.

Answer Sheet

Question Number Answer Key
1 A
2 B
3 C
4 A
5 A
6 A
7 A
8 B
9 A
10 B
11 B
12 A
13 A
14 A
15 B
16 C
ant_questions_answers.htm
Advertisements