- 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 - 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 '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 compiles the source code of the project?
Answer : B
Explanation
compile phase compile the source code of the project.
Q 4 - Which of the Build Profile is defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml)?
Answer : C
Explanation
Global − Defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml).
Q 5 - Which of the following maven plugin executes during the site generation and they should be configured in the element of the pom.xml?
Answer : B
Explanation
Reporting plugins − They execute during the site generation and they should be configured in the element of the pom.xml.
Q 6 - Which of the following scope is the default scope?
Answer : A
Explanation
compile − This scope indicates that dependency is available in classpath of project. It is default scope.
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.
Answer : A
Explanation
Root element of POM.xml is project.
Q 9 - Which of the following phase in maven life cycle post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes?
Answer : A
Explanation
process-classes post-processes the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes.
Q 10 - Which of the following phase in maven life cycle processes and deploys the package if necessary into an environment where integration tests can be run?
Answer : C
Explanation
integration-test processes and deploys the package if necessary into an environment where integration tests can be run.
To Continue Learning Please Login
Login with Google