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

POM stands for Project Object Model. It is fundamental Unit of Work in Maven. It is an XML file.

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

Explanation

SNAPSHOT is a special version that indicates a current development copy. Unlike regular versions, Maven checks for a new SNAPSHOT version in a remote repository for every build.

Q 6 - Which of the following is the default value of packaging?

A - ear

B - war

C - jar

D - pom

Answer : C

Explanation

If no packaging value has been specified, it will default to jar.

Answer : A

Explanation

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

Answer : C

Explanation

Maven use the effective pom (configuration from super pom plus project configuration) to execute relevant goal. It helps developer to specify minimum configuration detail in his/her pom.xml. Although configurations can be overridden easily.

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