# 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.

### Explanation

Maven uses Convention over Configuration which means developers are not required to create build process themselves. Developers do not have to mention each and every configuration details.

Q 2 - Which of the following configuration element is present in POM.xml?

A - developers

B - mailing list

C - Both of the above.

D - None of the above.

### Explanation

Both of the above configuration elements are present in POM.xml.

Q 3 - Which of the following phase in maven life cycle takes the compiled code and package it in its distributable format, such as a JAR?

A - validate

B - compile

C - test

D - package

### Explanation

package phase takes the compiled code and package it in its distributable format, such as a JAR.

Q 4 - Which of the Build Profile is defined in the project POM file, pom.xml?

A - Per Project

B - Per User

C - Global

D - None of the above.

### Explanation

Per Project − Defined in the project POM file, pom.xml.

### Explanation

It is developer's own custom repository containing required libraries or other project jars.

Q 6 - Which of the following refers to the version of the project?

A - ${pom.version} B -${project.version}

C - ${maven.version} D -${version}

### Explanation

\${pom.version} refers to the version of the project.

Q 7 - Apache Maven is a software project management and comprehension tool.

A - true

B - false

### Explanation

Apache Maven is a software project management and comprehension tool.

### Explanation

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 compiles the test source code into the test destination directory?

A - test-compile

B - process-test-sources

C - generate-test-sources

D - None of the above.

### Explanation

test-compile compiles the test source code into the test destination directory.

### Explanation

Maven plugins are used to do both of the above mentioned tasks.