- 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 - 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 is true about Maven Build Lifecycle?
Answer : C
Explanation
A Build Lifecycle is a well defined sequence of phases which define the order in which the goals are to be executed. Here phase represents a stage in life cycle.
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 following is a valid type of Maven repository?
Answer : D
Explanation
Maven repository are of three types: local, central, remote.
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 version of the project?
Answer : A
Explanation
${pom.version} refers to the version of the project.
Q 7 - What is the value for packaging element in pom for a project that is purely meta-data?
Answer : D
Explanation
pom is the value for packaging element in pom for a project that is purely meta-data.
Q 8 - Which of the following is correct about Goal in Maven?
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 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 - 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.
To Continue Learning Please Login
Login with Google