- 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 - 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 is true about Maven?
A - Maven is a project management and comprehension tool.
B - Maven provides developers a complete build lifecycle framework.
Answer : C
Explanation
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework.
Q 2 - Which of the following is true about Maven Build Lifecycle?
Answer : C
Explanation
A Build Lifecycle is a well defined sequence of phases which define the order in which the goals are to be executed. Here phase represents a stage in life cycle.
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 Build Profile is defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml)?
Answer : C
Explanation
Global − Defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml).
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 scope indicates that you have to provide the system path?
Answer : A
Explanation
system − This scope indicates that you have to provide the system path.
Q 7 - What MOJO stands for?
A - Main plain Old Java Object
B - Maven plain Old Java Object
Answer : B
Explanation
A mojo is a Maven plain Old Java Object.
Q 8 - Which of the following is correct about version in Maven pom.xml?
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 processes the generated files from test code file compilation?
Answer : A
Explanation
process-test-classes processes the generated files from test code file compilation.
Q 10 - When dependency in central repository is not found, then Maven searches dependency in remote repository.
Answer : A
Explanation
Maven searches dependency in remote repository or repositories, if found then it is downloaded to local repository for future reference otherwise Maven as expected stop processing and throws error (Unable to find dependency).