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 : B

Explanation

POM stands for Project Object Model.

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 takes the compiled code and package it in its distributable format, such as a JAR?

A - validate

B - compile

C - test

D - package

Answer : D

Explanation

package phase takes the compiled code and package it in its distributable format, such as a JAR.

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.

Answer : D

Explanation

Maven local repository is a folder location on your machine. It gets created when you run any maven command for the first time. Maven local repository keeps your project's all dependencies (library jars, plugin jars etc).

Q 6 - Which of the following refers to the version of the project?

A - ${pom.version}

B - ${project.version}

C - ${maven.version}

D - ${version}

Answer : A

Explanation

${pom.version} refers to the version of the project.

Answer : A

Explanation

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

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 - Which of the following phase in maven life cycle performs actions required after integration tests have been executed? For example, cleaning up the environment.

A - post-integration-test

B - pre-integration-test

C - integration-test

D - None of the above.

Answer : A

Explanation

post-integration-test performs actions required after integration tests have been executed. For example, cleaning up the environment.


maven_questions_answers.htm

Advertisements