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 processes and deploys the package if necessary into an environment where integration tests can be run?

A - integration-test

B - verify

C - install

D - deploy

Answer : A

Explanation

integration-test phase processes and deploys the package if necessary into an environment where integration tests can be run.

Q 4 - Which of the following is a valid type of Maven repository?

A - local

B - central

C - remote

D - All of the above.

Answer : D

Explanation

Maven repository are of three types: local, central, remote.

Answer : C

Explanation

Maven will automatically fetch the latest SNAPSHOT everytime dependent project is built. Unlike regular versions, Maven checks for a new SNAPSHOT version in a remote repository for every build.

Q 6 - Which of the following scope indicates that you have to provide the system path?

A - system

B - import

C - runtime

D - test

Answer : A

Explanation

system − This scope indicates that you have to provide the system path.

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.

Answer : C

Explanation

This is an Id of project's group. This is generally unique amongst an organization or a project. For example, a banking group com.company.bank has all bank related projects.

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 - When dependency in local repository is not found, then Maven searches dependency in central repository.

A - true

B - false

Answer : A

Explanation

Maven searches dependency in central repository, if not found and remote repository/repositories is/are mentioned then searches in remote repositories else if found, then it is downloaded to local repository for future reference.


maven_questions_answers.htm

Advertisements