Home / Interview / Maven :: General Questions

Interview :: Maven

11)

Define SNAPSHOT in terms of maven?

The snapshot indicates the current development copy.

12)

Define Archetype?

It is a Maven plugin which is designed for the creation of project structure.

13) What does central repository consist of?

It consists of a large number of libraries that are frequently used.

14)

Give the command for installation of the JAR file in a local repository?

mvn install

15)

Mention the phases of cleaning lifecycle?

The lifecycle of cleaning consist of:

  • pre-clean
  • clean
  • post-clean

16) What is the purpose of mvn clean command?

The command removes the target directory before the starting of a build process.

17) What is a MOJO?

A MOJO stands for Maven plain Old Java Object. Each MOJO is an executable goal in Maven, and a plugin is a distribution of one or more related MOJOs.

18) What is a repository?

A repository is a directory or place where all the jars and pom.xml file are stored. There are 3 types of a repository in Maven:

  1. Local Repository
  2. Central Repository
  3. Remote Repository
19) What is a local repository?

Maven local repository is created by maven in your local system when you run any maven command.

20) What is a central repository?

Maven community creates maven central repository on the web.