- 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 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 tests the compiled source code using a suitable unit testing framework?
Answer : C
Explanation
test phase tests the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
Q 4 - Which of the following phases is present in 'clean' Maven life cycle?
Answer : D
Explanation
The clean lifecycle consists of the following phases: 1) pre-clean 2) clean and 3) post-clean.
Q 5 - Which of the following scope indicates that dependency is available in classpath of project?
Answer : A
Explanation
compile − This scope indicates that dependency is available in classpath of project. It is default scope.
Q 6 - Which of the following scope indicates that dependency is to be provided by JDK or web-Server/Container at runtime?
Answer : B
Explanation
provided − This scope indicates that dependency is to be provided by JDK or web-Server/Container at runtime.
Q 7 - Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
Answer : A
Explanation
Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
Q 8 - Which of the following phase in maven life cycle generates any source code to be included in compilation phase?
Answer : A
Explanation
generate-sources generates any source code to be included in compilation phase.
Q 9 - Which of the following phase in maven life cycle compiles the test source code into the test destination directory?
Answer : A
Explanation
test-compile compiles the test source code into the test destination directory.
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