Maven - Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Maven. 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.

Questions and Answers

Answer : C

Explanation

POM stands for Project Object Model. It is fundamental Unit of Work in Maven. It is an XML file.

Q 2 - Which of the following configuration element is present in POM.xml?

A - project dependencies

B - plugins

C - goals

D - All of the above.

Answer : D

Explanation

All of the above configuration elements are present in POM.xml.

Q 3 - Which of the following phase in maven life cycle is done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects?

A - integration-test

B - verify

C - install

D - deploy

Answer : D

Explanation

deploy phase is done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

Answer : D

Explanation

Using all of the above ways, you can activate a Maven Build Profile.

Q 5 - Archetype is a Maven plugin whose task is to create a project structure as per its template.

A - true

B - false

Answer : A

Explanation

Archetype is a Maven plugin whose task is to create a project structure as per its template.

Q 6 - Which of the following scope indicates that you have to provide the system path?

A - system

B - import

C - runtime

D - test

Answer : A

Explanation

system − This scope indicates that you have to provide the system path.

Answer : A

Explanation

The <execution> element contains information's required for the execution of a plugin.

Q 8 - Root element of POM.xml is project.

A - true

B - false

Answer : A

Explanation

Root element of POM.xml is project.

Q 9 - Which of the following phase in maven life cycle post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes?

A - process-classes

B - process-test-sources

C - process-test-classes

D - None of the above.

Answer : A

Explanation

process-classes post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes.

Answer : D

Explanation

Maven plugins are used to do all of the above mentioned tasks.

maven_questions_answers.htm
Advertisements