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

Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework.

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

A - developers

B - mailing list

C - Both of the above.

D - None of the above.

Answer : C

Explanation

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

Q 3 - Which of the following phase in maven life cycle validates that the project is correct and all necessary information is available?

A - validate

B - compile

C - test

D - package

Answer : A

Explanation

validate phase validates that the project is correct and all necessary information is available.

Q 4 - Which of the following phases is present in 'site' Maven life cycle?

A - pre-site

B - site

C - site-deploy

D - All of the above.

Answer : D

Explanation

The site lifecycle consists of the following phases: 1) pre-site 2) site 3) post-site and 4) site-deploy.

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 dependency is not required for compilation, but is required during execution?

A - compile

B - provided

C - runtime

D - test

Answer : C

Explanation

runtime − This scope indicates that dependency is not required for compilation, but is required during execution.

Answer : C

Explanation

Maven provides a comprehensive model for projects which is reusable, maintainable, and easier to comprehend and provides plugins or tools that interact with its declarative model.

Answer : C

Explanation

All POMs inherit from a parent (despite explicitly defined or not). This base POM is known as the Super POM, and contains values inherited by default.

Q 9 - Which of the following phase in maven life cycle performs any operations necessary to prepare a package before the actual packaging?

A - process-resources

B - process-test-sources

C - prepare-package

D - None of the above.

Answer : C

Explanation

prepare-package performs any operations necessary to prepare a package before the actual packaging.

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