- 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 aspects of a project can be managed using Maven?
Answer : D
Explanation
All of the above aspects of a project can be managed using Maven.
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 validates that the project is correct and all necessary information is available?
Answer : A
Explanation
validate phase validates that the project is correct and all necessary information is available.
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 command can be used to create a new project based on an archtype?
Answer : B
Explanation
mvn archetype:generate command can be used to create a new project based on an archtype.
Answer : C
Explanation
If no packaging value has been specified, it will default to jar.
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 processes the generated files from test code file compilation?
Answer : A
Explanation
process-test-classes processes the generated files from test code file compilation.
Q 10 - When dependency in central repository is not found, then Maven searches dependency in remote repository.
Answer : A
Explanation
Maven searches dependency in remote repository or repositories, if found then it is downloaded to local repository for future reference otherwise Maven as expected stop processing and throws error (Unable to find dependency).