- 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 - Which of the following is true about Maven Conventions?
B - Developers using maven do not have to mention each and every configuration details.
Answer : C
Explanation
Maven uses Convention over Configuration which means developers are not required to create build process themselves. Developers do not have to mention each and every configuration details.
Q 2 - Which of the following is true about 'clean' Maven life cycle?
A - It cleans up artifacts created by prior builds.
B - This is used to build the application.
Answer : A
Explanation
clean: cleans up artifacts created by prior builds.
Q 3 - Which of the following phase in maven life cycle runs any checks to verify the package is valid and meets quality criteria?
Answer : B
Explanation
verify phase runs any checks to verify the package is valid and meets quality criteria.
Q 4 - Which of the following is true about Maven repository?
Answer : C
Explanation
A repository is a place i.e. directory where all the project jars, library jar, plugins or any other project specific artifacts are stored and can be used by Maven easily.
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 is only used when dependency is of type pom?
Answer : B
Explanation
import: This scope is only used when dependency is of type pom. This scope indicates that the specified POM should be replaced with the dependencies in that POM's <dependencyManagement> section.
Q 7 - Which of the following is true about MOJO?
A - A mojo is a Maven plain Old Java Object.
B - Each mojo is an executable goal in Maven.
C - A plugin is a distribution of one or more related mojos.
Answer : D
Explanation
A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos.
Q 8 - Which of the following is correct about super POM?
A - All POMs inherit from a parent (despite explicitly defined or not) known as super POM.
Answer : C
Explanation
All POMs inherit from a parent (despite explicitly defined or not). This base POM is known as the Super POM, and contains values inherited by default.
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 - Which of the following is true about Maven central repository?
A - This repository is managed by Maven community.
B - It is not required to be configured.
Answer : D
Explanation
This repository is managed by Maven community. It is not required to be configured. It requires internet access to be searched.
To Continue Learning Please Login
Login with Google