- Maven Tutorial
- Maven - Home
- Maven - Overview
- Maven - Environment Setup
- Maven - POM
- Maven - Build Life Cycle
- Maven - Build Profiles
- Maven - Repositories
- Maven - Plug-ins
- Maven - Creating Project
- Maven - Build & Test Project
- Maven - External Dependencies
- Maven - Project Documents
- Maven - Project Templates
- Maven - Snapshots
- Maven - Build Automation
- Maven - Manage Dependencies
- Maven - Deployment Automation
- Maven - Web Application
- Maven - Eclipse IDE
- Maven - NetBeans
- Maven - IntelliJ IDEA
- Maven Useful Resources
- Maven - Questions and Answers
- Maven - Quick Guide
- Maven - Useful Resources
- Maven - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
Q 1 - Which of the following command can tell the version of maven?
Answer : A
Explanation
mvn --version tells the version of maven.
Q 2 - Which of the following is true about 'site' Maven life cycle?
A - It cleans up artifacts created by prior builds.
B - This is used to build the application.
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?
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 is true about Build Profile in Maven terminology?
Answer : C
Explanation
A Build profile is a set of configuration values which can be used to set or override default values of Maven build. Using a build profile, you can customize build for different environments such as Production v/s Development environments.
Q 5 - Which of the following is true about Maven remote repository?
A - It is developer's own custom repository containing required libraries or other project jars.
Answer : A
Explanation
It is developer's own custom repository containing required libraries or other project jars.
Q 6 - Which of the following refers to the version of the project?
Answer : A
Explanation
${pom.version} refers to the version of the project.
Q 7 - What is the value for packaging element in pom for a project that is purely meta-data?
Answer : D
Explanation
pom is the value for packaging element in pom for a project that is purely meta-data.
Q 8 - Which of the following is correct about groupId in Maven pom.xml?
A - This is an Id of project's group.
B - This is generally unique amongst an organization or a project.
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 copies and processes the resources into the destination directory, ready for packaging phase?
Answer : B
Explanation
process-resources copies and processes the resources into the destination directory, ready for packaging phase.
Q 10 - When Maven starts looking for dependency libraries, it first searches dependency in local repository.
Answer : A
Explanation
When Maven starts looking for dependency libraries, it first searches dependency in local repository.