- 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 '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 validates that the project is correct and all necessary information is available?
Answer : A
Explanation
validate phase validates that the project is correct and all necessary information is available.
Q 4 - Using which of the following way, you can activate a Maven Build Profile?
Answer : C
Explanation
Using both of the above ways, you can activate a Maven Build Profile.
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 scope is only used when dependency is of type pom?
Answer : B
Explanation
import: This scope is only used when dependency is of type pom. This scope indicates that the specified POM should be replaced with the dependencies in that POM's <dependencyManagement> section.
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 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 performs any operations necessary to prepare a package before the actual packaging?
Answer : C
Explanation
prepare-package performs any operations necessary to prepare a package before the actual packaging.
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.