- 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 - 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 - A maven artifact is a file, usually a JAR that gets deployed to a Maven repository.
B - A Maven build produces one or more artifacts, such as a compiled JAR and a 'sources' JAR.
Answer : C
Explanation
A maven artifact is a file, usually a JAR that gets deployed to a Maven repository. A Maven build produces one or more artifacts, such as a compiled JAR and a 'sources' JAR.
Q 3 - Which of the following phase in maven life cycle compiles the source code of the project?
Answer : B
Explanation
compile phase compile the source code of the project.
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 is true about Maven local repository?
A - Maven local repository is a folder location on your machine.
B - It gets created when you run any maven command for the first time.
C - Maven local repository keeps your project's all dependencies (library jars, plugin jars etc).
Answer : D
Explanation
Maven local repository is a folder location on your machine. It gets created when you run any maven command for the first time. Maven local repository keeps your project's all dependencies (library jars, plugin jars etc).
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 - 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.
Answer : B
Explanation
Projects notation in repository is groupId:artifactId:version.
Q 9 - Which of the following phase in maven life cycle generates any test source code to be included in compilation phase?
Answer : C
Explanation
generate-test-sources generates any test source code to be included in compilation phase.
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.