- 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 - Development team can automate the project's build infrastructure in almost no time using Maven.
B - Maven uses a standard directory layout and a default build lifecycle.
Answer : C
Explanation
Development team can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.
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 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 - 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 maven plugin executes during the build and should be configured in the element of pom.xml?
Answer : A
Explanation
Build plugins − They execute during the build and should be configured in the element of pom.xml.
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 - All POM files require the project element and three mandatory fields: groupId, artifactId,version.
Answer : B
Explanation
All POM files require the project element and three mandatory fields: groupId, artifactId,version.
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 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 - Maven Plugins are generally used to:
Answer : C
Explanation
Maven plugins are used to do both of the above mentioned tasks.