- 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 aspects of a project can be managed using Maven?
Answer : D
Explanation
All of the above aspects of a project can be managed using Maven.
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 processes and deploys the package if necessary into an environment where integration tests can be run?
Answer : A
Explanation
integration-test phase processes and deploys the package if necessary into an environment where integration tests can be run.
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 is true about a SNAPSHOT build?
A - Maven will automatically fetch the latest SNAPSHOT everytime dependent project is built.
Answer : C
Explanation
Maven will automatically fetch the latest SNAPSHOT everytime dependent project is built. Unlike regular versions, Maven checks for a new SNAPSHOT version in a remote repository for every build.
Q 6 - Which of the following refers to the name of the project?
Answer : A
Explanation
${pom.name} refers to the name of the project.
Q 7 - What MOJO stands for?
A - Main plain Old Java Object
B - Maven plain Old Java Object
Answer : B
Explanation
A mojo is a Maven plain Old Java Object.
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 performs actions required before integration tests are executed. For example, setting up the required environment?
Answer : B
Explanation
pre-integration-test performs actions required before integration tests are executed. For example, setting up the required environment.
Q 10 - Maven Plugins are generally used to:
Answer : C
Explanation
Maven plugins are used to do both of the above mentioned tasks.
To Continue Learning Please Login
Login with Google