Maven - Online Quiz


Advertisements

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

Q 1 - Which of the following aspects of a project can be managed using Maven?

A - Dependencies

B - SCMs

C - Releases

D - All of the above.

Answer : D

Explanation

All of the above aspects of a project can be managed using Maven.

Answer : C

Explanation

A Build Lifecycle is a well defined sequence of phases which define the order in which the goals are to be executed. Here phase represents a stage in life cycle.

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.

Q 4 - Which of the Build Profile is defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml)?

A - Per Project

B - Per User

C - Global

D - None of the above.

Answer : C

Explanation

Global − Defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml).

Q 5 - Which of the following maven plugin executes during the site generation and they should be configured in the element of the pom.xml?

A - Build plugins

B - Reporting plugins

C - Both of the above

D - None of the above.

Answer : B

Explanation

Reporting plugins − They execute during the site generation and they should be configured in the element of the pom.xml.

Q 6 - Which of the following scope indicates that dependency is to be provided by JDK or web-Server/Container at runtime?

A - compile

B - provided

C - runtime

D - test

Answer : B

Explanation

provided − This scope indicates that dependency is to be provided by JDK or web-Server/Container at runtime.

Q 7 - There should be a single POM file for each project.

A - true

B - false

Answer : A

Explanation

There should be a single POM file for each project.

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 compiles the test source code into the test destination directory?

A - test-compile

B - process-test-sources

C - generate-test-sources

D - None of the above.

Answer : A

Explanation

test-compile compiles the test source code into the test destination directory.

Q 10 - When Maven starts looking for dependency libraries, it first searches dependency in local repository.

A - true

B - false

Answer : A

Explanation

When Maven starts looking for dependency libraries, it first searches dependency in local repository.

maven_questions_answers.htm
Advertisements