- 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?
Answer : C
Explanation
POM stands for Project Object Model. It is fundamental Unit of Work in Maven. It is an XML file.
Q 2 - Which of the following is true about 'build' Maven life cycle?
A - It cleans up artifacts created by prior builds.
B - This is used to build the application.
Answer : B
Explanation
default (or build) − This is used to build the application.
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 - Which of the Build Profile is defined in the project POM file, pom.xml?
Answer : A
Explanation
Per Project − Defined in the project POM file, pom.xml.
Q 5 - Which of the following is true about a SNAPSHOT build?
A - SNAPSHOT is a special version that indicates a current development copy.
Answer : C
Explanation
SNAPSHOT is a special version that indicates a current development copy. Unlike regular versions, Maven checks for a new SNAPSHOT version in a remote repository for every build.
Answer : C
Explanation
If no packaging value has been specified, it will default to jar.
Q 7 - What is the use of execution element in pom file?
A - The <execution> element contains information's required for the execution of a plugin.
B - The <execution> element contains information's required for the execution of a project.
Answer : A
Explanation
The <execution> element contains information's required for the execution of a plugin.
Q 8 - Which of the following is correct about super POM?
Answer : C
Explanation
Maven use the effective pom (configuration from super pom plus project configuration) to execute relevant goal. It helps developer to specify minimum configuration detail in his/her pom.xml. Although configurations can be overridden easily.
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 - Which of the following phase in maven life cycle performs actions required after integration tests have been executed? For example, cleaning up the environment.
Answer : A
Explanation
post-integration-test performs actions required after integration tests have been executed. For example, cleaning up the environment.
To Continue Learning Please Login
Login with Google