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

Development team can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.

Answer : D

Explanation

Each artifact has a group ID (usually a reversed domain name, like com.example.foo), an artifact ID (just a name), and a version string. The three together uniquely identify the artifact. A project's dependencies are specified as artifacts.

Q 3 - Which of the following phase in maven life cycle is done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects?

A - integration-test

B - verify

C - install

D - deploy

Answer : D

Explanation

deploy phase is done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

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

Explanation

It is developer's own custom repository containing required libraries or other project jars.

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.

Q 7 - What is the value for packaging element in pom for a project that is purely meta-data?

A - ear

B - war

C - jar

D - pom

Answer : D

Explanation

pom is the value for packaging element in pom for a project that is purely meta-data.

Answer : C

Explanation

This is the version of the project.Along with the groupId, It is used within an artifact's repository to separate versions from each other. For example: com.company.bank:consumer-banking:1.0, com.company.bank:consumer-banking:1.1.

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

This repository is managed by Maven community. It is not required to be configured. It requires internet access to be searched.


maven_questions_answers.htm

Advertisements