- 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 is true about maven artifact?
A - Each artifact has a group ID, an artifact ID (just a name), and a version string.
B - The group ID,artifact ID and version together uniquely identify the artifact.
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 command quickly builds Maven site?
Answer : D
Explanation
mvn site command can quickly builds Maven site.
Q 4 - Which of the following phases is present in 'site' Maven life cycle?
Answer : D
Explanation
The site lifecycle consists of the following phases: 1) pre-site 2) site 3) post-site and 4) site-deploy.
Q 5 - Which of the following scope indicates that dependency is available in classpath of project?
Answer : A
Explanation
compile − This scope indicates that dependency is available in classpath of project. It is default scope.
Q 6 - Which of the following scope indicates that dependency is not required for compilation, but is required during execution?
Answer : C
Explanation
runtime − This scope indicates that dependency is not required for compilation, but is required during execution.
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.
Answer : A
Explanation
Root element of POM.xml is project.
Q 9 - Which of the following phase in maven life cycle generates resources to be included in the package?
Answer : A
Explanation
generate-resources generates resources to be included in the package.
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.