- 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 is true about Maven?
A - Maven is a project management and comprehension tool.
B - Maven provides developers a complete build lifecycle framework.
Answer : C
Explanation
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework.
Q 2 - Which of the following is true about maven artifact?
A - A maven artifact is a file, usually a JAR that gets deployed to a Maven repository.
B - A Maven build produces one or more artifacts, such as a compiled JAR and a 'sources' JAR.
Answer : C
Explanation
A maven artifact is a file, usually a JAR that gets deployed to a Maven repository. A Maven build produces one or more artifacts, such as a compiled JAR and a 'sources' JAR.
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 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.
Answer : C
Explanation
If no packaging value has been specified, it will default to jar.
Q 7 - Which of the following is true about Maven?
B - Maven provides plugins or tools that interact with its declarative model.
Answer : C
Explanation
Maven provides a comprehensive model for projects which is reusable, maintainable, and easier to comprehend and provides plugins or tools that interact with its declarative model.
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 performs actions required before integration tests are executed. For example, setting up the required environment?
Answer : B
Explanation
pre-integration-test performs actions required before integration tests are executed. For example, setting up the required environment.
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.