- 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 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 configuration element is present in POM.xml?
Answer : C
Explanation
Both of the above configuration elements are present in POM.xml.
Q 3 - Which of the following phase in maven life cycle validates that the project is correct and all necessary information is available?
Answer : A
Explanation
validate phase validates that the project is correct and all necessary information is available.
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 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 Maven?
A - When a Maven project is created, Maven creates default project structure.
Answer : C
Explanation
When a Maven project is created, Maven creates default project structure. Developer is only required to place files accordingly and he/she need not to define any configuration in pom.xml.
Q 8 - Which of the following is correct about super POM?
Answer : C
Explanation
Maven use the effective pom (configuration from super pom plus project configuration) to execute relevant goal. It helps developer to specify minimum configuration detail in his/her pom.xml. Although configurations can be overridden easily.
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 - 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.