Maven Colasecing Pipeline MCQs

This is a set of 25 questions of Maven Colasecing Pipeline MCQs. All questions and answers are based on our research and self-study. If you missed the latest MCQs post on our site please visit once.

First, we need to understand What is Apache Maven?

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting, and documentation from a central piece of information.

Source: Apache.maven

1.) How can we compile and generate war files using a single command?

Answer.) mvn compile war:war

2.) Syntax to create maven project.

Answer.) mvn archtype:generate

3.) How to generate war file?

Answer.) mvn package

4.) War files are created for….

Answer.) Web and Java

5.) What is archetype?

Answer.) It is maven project templating toolkit

6.) To generate war file using single command, which command in these options is correct.

Answer.) mvn archetype:generate -DartifactId=First-WebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

7.) What are the types of maven plugins

Answer.) Build and Reporting plugins

8.) Maven plugin is

Answer.) Both

9.) Surefire plugins are used for….

Answer.) for running JUnit test and report generation

10.) Which command is used for skipping the test?

Answer.) mvn install -DskipTests

11.) Which command is used for checking upgrade check?

Answer.) (-Dsurefire.junit4.upgradecheck)

12.) Which option stands for Super POM

Answer.) both options

13.) Which of the flow is correct for clean life cycle.

Answer.) pre clean,clean,post clean

14.) Site life cycle have

Answer.) prsite,site,post site,deploy

15.) Super POM is a view-only POM for attributes of all dependencies exists across multiple POMs

Answer.) TRUE

16.) Syntax to create jar file without compiling the build

Answer.) mvn jar:jar

17.) Which command is used to remove build data and target directory

Answer.) mvn clean

18.) Syntax used to build maven site

Answer.) mvn package/mvn SITE package

19.) POM describes how to build a project.

Answer.) FALSE

20.) Syntax used to create war file

Answer.) Dinteractivemode=false

21.) To validate maven project we use

Answer.) mvn validate

22.) Inclusive quantifiers boundary range is defined as

Answer.) [,3.8]

23.) List of files generate from maven archetype

Answer.) pom and main

24.) Exclusive quantifies boundary range is defined as

Answer.) [3.8,4.6)

25.) It is mandatory to have at least one goal associated with a build phase.

Answer.) FALSE

Leave a Reply

Your email address will not be published. Required fields are marked *