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 configuration element is present in POM.xml?
Answer : C
Explanation
Both of the above configuration elements are present in POM.xml.
Q 3 - Which of the following phase in maven life cycle installs the package into the local repository, for use as a dependency in other projects locally?
Answer : C
Explanation
install phase installs the package into the local repository, for use as a dependency in other projects locally.
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 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.
Q 6 - Which of the following refers to the final name of the file created when the built project is packaged?
Answer : A
Explanation
${pom.build.finalName} refers to the final name of the file created when the built project is packaged.
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 generates any test source code to be included in compilation phase?
Answer : C
Explanation
generate-test-sources generates any test source code to be included in compilation phase.
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.