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.

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

A - build profiles

B - project version

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 - Using which of the following way, you can activate a Maven Build Profile?

A - OS Settings (for example, Windows family).

B - Present/missing files.

C - Both of the above.

D - None of the above.

Answer : C

Explanation

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

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

A - Build plugins

B - Reporting plugins

C - Both of the above

D - None of the above.

Answer : A

Explanation

Build plugins − They execute during the build and should be configured in the element of pom.xml.

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.

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 - Projects notation in repository is groupId:artifactId:version.

A - false

B - true

Answer : B

Explanation

Projects notation in repository is groupId:artifactId:version.

Q 9 - Which of the following phase in maven life cycle performs actions required before integration tests are executed. For example, setting up the required environment?

A - process-resources

B - pre-integration-test

C - prepare-package

D - None of the above.

Answer : B

Explanation

pre-integration-test performs actions required before integration tests are executed. For example, setting up the required environment.

Answer : D

Explanation

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


maven_questions_answers.htm

Advertisements