- 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 of the following is true about POM?
A - It always resides in the base directory of the project as pom.xml.
Answer : C
Explanation
POM contains information about the project and various configuration details used by Maven to build the project(s) and it always resides in the base directory of the project as pom.xml.
Q 2 - Which of the following configuration element is present in POM.xml?
Answer : D
Explanation
All of the above configuration elements are present in POM.xml.
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 Build Profile is defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml)?
Answer : C
Explanation
Global − Defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml).
Q 5 - Which of the following maven plugin executes during the site generation and they should be configured in the element of the pom.xml?
Answer : B
Explanation
Reporting plugins − They execute during the site generation and they should be configured in the element of the pom.xml.
Q 6 - Which of the following refers to the version of the project?
Answer : A
Explanation
${pom.version} refers to the version of the project.
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 version in Maven pom.xml?
Answer : C
Explanation
This is the version of the project.Along with the groupId, It is used within an artifact's repository to separate versions from each other. For example: com.company.bank:consumer-banking:1.0, com.company.bank:consumer-banking:1.1.
Q 9 - Which of the following phase in maven life cycle processes the test source code, for example, filter any values?
Answer : B
Explanation
process-test-sources processes the test source code, for example, filter any values.
Q 10 - Which of the following phase in maven life cycle processes and deploys the package if necessary into an environment where integration tests can be run?
Answer : C
Explanation
integration-test processes and deploys the package if necessary into an environment where integration tests can be run.