- 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 - 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 is true about goal in Maven terminology?
A - A goal represents a specific task which contributes to the building and managing of a project.
Answer : D
Explanation
A goal represents a specific task which contributes to the building and managing of a project. It may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of the build lifecycle by direct invocation.
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 command can be used to create a new project based on an archtype?
Answer : B
Explanation
mvn archetype:generate command can be used to create a new project based on an archtype.
Q 6 - Which of the following refers to the final name of the file created when the built project is packaged?
Answer : A
Explanation
${pom.build.finalName} refers to the final name of the file created when the built project is packaged.
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 artifactId in Maven pom.xml?
A - This is an Id of the project.
Answer : C
Explanation
This is an Id of the project.This is generally name of the project. For example, consumer-banking. Along with the groupId, the artifactId defines the artifact's location within the repository.
Q 9 - Which of the following phase in maven life cycle processes the source code, for example, filter any value?
Answer : B
Explanation
process-sources processes the source code, for example, filter any value.
Q 10 - Maven Plugins are generally used to:
Answer : D
Explanation
Maven plugins are used to do all of the above mentioned tasks.