Maven - Interview Questions and Answers - Multiple Choice - Objective Test


Q1. What is Maven's order of inheritance?

a. parent pom -> project pom -> settings -> CLI parameters
b. project pom -> parent pom -> settings -> CLI parameters
c. settings -> parent pom -> project pom -> CLI parameters
d. CLI parameters -> settings -> parent pom -> project pom
show Answer

Ans. parent pom -> project pom -> settings -> CLI parameters


Q2. How do I determine which POM contains missing transitive dependency?

a. mvn -A
b. mvn -M
c. mvn -R
d. mvn -X
show Answer

Ans. mvn -X


Q3. What is the sequence in which Maven looks for the resources ?

a. Remote-> Maven Central - > Local
b. Local -> Remote - Maven Central
c. Remote-> Local -> Maven Central
d. Maven Central -> Local -> Remote
show Answer

Ans. Local -> Remote - Maven Central


Q4. POM stands for ...

a. Project Object Model
b. Project Oriented Model
c. Prospective Object Model
d. Prospective Objective Model
show Answer

Ans. Project Object Model


Q5. Which of the following is not type of Maven Repository ?

a. Local
b. Remote
c. Maven Central
d. Maven Local
show Answer

Ans. Maven Local


Q6. What is the default location of local repository ?

a. ~/.m2/repo
b. ~/m2./home/repository
c. ~/m2./repository
d. ~/m2./home/repo
show Answer

Ans. ~/m2./repository


Q7. Which of the following is not type of Maven Plugin ?

a. Build
b. Reporting
c. Remote
d. All are valid Maven Plugin types
show Answer

Ans. Remote


Q8. Which of the following is not a dependency scope in Maven ?

a. Compile
b. Test
c. System
d. Export
show Answer

Ans. Export


Q9. What is a project's fully qualified artifact name?

a. ::
b. :
c. ::
d. :
show Answer

Ans. ::