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 command can tell the version of maven?
mvn --version tells the version of maven.
Q 2 - Which of the following is true about Maven Build Lifecycle?
A Build Lifecycle is a well defined sequence of phases which define the order in which the goals are to be executed. Here phase represents a stage in life cycle.
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?
install phase installs the package into the local repository, for use as a dependency in other projects locally.
Q 4 - Which of the following is a valid type of Maven repository?
Maven repository are of three types: local, central, remote.
Q 5 - Which of the following is true about a SNAPSHOT build?
Maven will automatically fetch the latest SNAPSHOT everytime dependent project is built. Unlike regular versions, Maven checks for a new SNAPSHOT version in a remote repository for every build.
If no packaging value has been specified, it will default to jar.
There should be a single POM file for each project.
Q 8 - Which of the following is correct about version in Maven pom.xml?
This is the version of the project.Along with the groupId, It is used within an artifact's repository to separate versions from each other. For example: com.company.bank:consumer-banking:1.0, com.company.bank:consumer-banking:1.1.
Q 9 - Which of the following phase in maven life cycle processes the test source code, for example, filter any values?
process-test-sources processes the test source code, for example, filter any values.
Q 10 - Maven Plugins are generally used to:
Maven plugins are used to do all of the above mentioned tasks.