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

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

Answer : C

Explanation

site − generates site documentation for the project.

Q 3 - Which of the following phase in maven life cycle installs the package into the local repository, for use as a dependency in other projects locally?

A - integration-test

B - verify

C - install

D - deploy

Answer : C

Explanation

install phase installs the package into the local repository, for use as a dependency in other projects locally.

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.

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 is the default scope?

A - compile

B - provided

C - runtime

D - test

Answer : A

Explanation

compile − This scope indicates that dependency is available in classpath of project. It is default scope.

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 generates resources to be included in the package?

A - generate-resources

B - generate-sources

C - generate-test-sources

D - None of the above.

Answer : A

Explanation

generate-resources generates resources to be included in the package.

Answer : C

Explanation

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


maven_questions_answers.htm

Advertisements