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

Answer : C

Explanation

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

Answer : B

Explanation

default (or build) − This is used to build the application.

Q 3 - Which of the following phase in maven life cycle runs any checks to verify the package is valid and meets quality criteria?

A - integration-test

B - verify

C - install

D - deploy

Answer : B

Explanation

verify phase runs any checks to verify the package is valid and meets quality criteria.

Q 4 - Which of the Build Profile is defined in the project POM file, pom.xml?

A - Per Project

B - Per User

C - Global

D - None of the above.

Answer : A

Explanation

Per Project − Defined in the project POM file, pom.xml.

Answer : D

Explanation

It is repository provided by Maven community. It contains a large number of commonly used libraries. When Maven does not find any dependency in local repository, it starts searching in central repository using following URL: http://repo1.maven.org/maven2/.

Q 6 - Which of the following scope indicates that the dependency is only available for the test compilation and execution phases?

A - compile

B - provided

C - runtime

D - test

Answer : D

Explanation

test − This scope indicates that the dependency is only available for the test compilation and execution phases.

Q 7 - All POM files require the project element and three mandatory fields: groupId, artifactId,version.

A - false

B - true

Answer : B

Explanation

All POM files require the project element and three mandatory fields: groupId, artifactId,version.

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 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.

Answer : D

Explanation

This repository is managed by Maven community. It is not required to be configured. It requires internet access to be searched.

maven_questions_answers.htm
Advertisements