Home Interview Questions and Answers Maven Interview Questions and Answers For Freshers Part-1

maven1.What are the steps involved in project deployment?
Normally a deployment process consists of following steps −

Check-in the code from all projects in progress into the SVN or source code repository and tag it.

Download the complete source code from SVN.

Build the application.

Store the build output either WAR or EAR file to a common network location.

Get the file from network and deploy the file to the production site.

Updated the documentation with date and updated version number of the application.

2.What is Maven?
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework. Development team can automate the project’s build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.

3.What does it mean when you say Maven uses Convention over Configuration?
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.

4.What are the aspects Maven manages?
Maven provides developers ways to manage following −








mailing list

5.How do you know the version of mvn you are using?
Type the following command −

mvn –version

6.What is POM?
POM stands for Project Object Model. It is fundamental Unit of Work in Maven. It is an XML file. It always resides in the base directory of the project as pom.xml. It contains information about the project and various configuration details used by Maven to build the project(s).

7.What information does POM contain?
POM contains the some of the following configuration information −

project dependencies



build profiles

project version


mailing list

8.What is Maven artifact?
An artifact is a file, usually a JAR that gets deployed to a Maven repository. A Maven build produces one or more artifacts, such as a compiled JAR and a “sources” JAR.

Each artifact has a group ID (usually a reversed domain name, like com.example.foo), an artifact ID (just a name), and a version string. The three together uniquely identify the artifact. A project’s dependencies are specified as artifacts.

9.What is 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.

10.Name the 3 build lifecycle of Maven.
The three build lifecycles are −

clean:cleans up artifacts created by prior builds.

default (or build):This is used to build the application.

site: generates site documentation for the project.

You may also like

Leave a Comment