- 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 - Which of the following command can tell the version of maven?
Answer : A
Explanation
mvn --version tells the version of maven.
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 runs any checks to verify the package is valid and meets quality criteria?
Answer : B
Explanation
verify phase runs any checks to verify the package is valid and meets quality criteria.
Q 4 - Using which of the following way, you can activate a Maven Build Profile?
A - Explicitly using command console input.
Answer : D
Explanation
Using all of the above ways, you can activate a Maven Build Profile.
Q 5 - Which of the following is true about Maven remote repository?
A - It is developer's own custom repository containing required libraries or other project jars.
Answer : A
Explanation
It is developer's own custom repository containing required libraries or other project jars.
Q 6 - Which of the following scope indicates that dependency is not required for compilation, but is required during execution?
Answer : C
Explanation
runtime − This scope indicates that dependency is not required for compilation, but is required during execution.
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.
Answer : B
Explanation
Projects notation in repository is groupId:artifactId:version.
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 - 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.