- 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 aspects of a project can be managed using Maven?
Answer : D
Explanation
All of the above aspects of a project can be managed using Maven.
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 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 - Archetype is a Maven plugin whose task is to create a project structure as per its template.
Answer : A
Explanation
Archetype is a Maven plugin whose task is to create a project structure as per its template.
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 - Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
Answer : A
Explanation
Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
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 performs actions required before integration tests are executed. For example, setting up the required environment?
Answer : B
Explanation
pre-integration-test performs actions required before integration tests are executed. For example, setting up the required environment.
Q 10 - When dependency in local repository is not found, then Maven searches dependency in central repository.
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.