- 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
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 - What POM stands for?
Answer : B
Explanation
POM stands for Project Object Model.
Q 2 - Which of the following configuration element is present in POM.xml?
Answer : D
Explanation
All of the above configuration elements are present in POM.xml.
Q 3 - Which of the following phase in maven life cycle tests the compiled source code using a suitable unit testing framework?
Answer : C
Explanation
test phase tests the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
Q 4 - Which of the following phases is present in 'clean' Maven life cycle?
Answer : D
Explanation
The clean lifecycle consists of the following phases: 1) pre-clean 2) clean and 3) post-clean.
Q 5 - Which of the following maven plugin executes during the build and should be configured in the element of pom.xml?
Answer : A
Explanation
Build plugins − They execute during the build and should be configured in the element of pom.xml.
Q 6 - Which of the following scope indicates that the dependency is only available for the test compilation and execution phases?
Answer : D
Explanation
test − This scope indicates that the dependency is only available for the test compilation and execution phases.
Q 7 - Which of the following is true about Maven?
B - Maven provides plugins or tools that interact with its declarative model.
Answer : C
Explanation
Maven provides a comprehensive model for projects which is reusable, maintainable, and easier to comprehend and provides plugins or tools that interact with its declarative model.
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 post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes?
Answer : A
Explanation
process-classes post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes.
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.
To Continue Learning Please Login
Login with Google