Maven Colasecing Pipeline | Fresco Play

Maven Colasecing Pipeline | Fresco Play

Monday, May 22, 2023
~ 5 min read
Maven Colasecing Pipeline | Fresco Play

Question 1: How can we compile and generate war file using single command

Answer: mvn compile war:war


Question 2: Syntax to create maven project.

Answer: mvn archetype:generate


Question 3: How to generate war file

Answer: mvn package


Question 4: War files are created for

Answer: Web and Java application


Question 5: What is archetype

Answer: It is maven project templating toolkit


Question 6: To generate war file using single command,which command in these option is correct

Answer: mvn archetype:generate -DgroupId=com.fresco.play -DartifactId=First-WebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false


Question 7: What are the types of maven plugins

Answer: Build and Reporting plugins


Question 8: Maven plugin is

Answer: Both the options mentioned


Question 9: Surefire plugins are used for

Answer: for running junit test and report generation


Question 10: Which command is used for skipping the test

Answer: mvn install -DskipTests


Question 11: Which command is used for checking upgrade check

Answer: =-Dsurefire.junit4.upgradecheck


Question 12: Which option stands for Super POM

Answer: Both the options mentioned


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

Answer: pre clean , clean ,post clean


Question 14: Site life cycle have

Answer: pre-site->site->post-site->deploy


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

Answer: True


Question 16: Syntax to create jar file without compiling the build

Answer: mvn jar:jar


Question 17: Which command is used to remove build data and target directory

Answer: mvn clean package.


Question 18: Syntax used to build maven site

Answer: mvn site


Question 19: POM describes how to build a project

Answer: False


Question 20: Syntax used to create war file

Answer: mvn archetype:generate -DgroupId=com.fresco.play -DartifactId=First-WebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false


Question 21: To validate maven project we use

Answer: mvn validate-project


Question 22: Inclusive quantifiers boundary range is defined as

Answer: [,3.8]


Question 23: List of files generate from maven archetype

Answer: pom file, main and test folder


Question 24: Exclusive quantifies boundary range is defined as

Answer: [3.8,4.6)


Question 25: It is mandatory to have at least one goal associated with a build phase

Answer: False


Question 26: What is GAV in maven

Answer: Both options define GAV


Question 27: Dependency Management allows to

Answer: consolidate and centralize the management of dependency versions


Question 28: Surefire reports are in

Answer: *.txt and *.xml Format.


Question 29: Syntax to skip the compilation of the test

Answer: mvn install -Dmaven.test.skip=true


Question 30: Syntax to build maven project offline

Answer: mvn -o package


Question 31: What does dependency range mean, [2.0.7, 2.0.9)

Answer: 2.0.7,2.0.8


Question 32: Maven build process is composed of one build life cycles but has one or more phases

Answer: False


Question 33: Maven is

Answer: comprehensive and management


Question 34: How to check maven version

Answer: mvn -version


Question 35: POM stands for __________ in maven

Answer: project object model


Question 36: What are the minimal coordinate attributes required for pom xlm file

Answer: groupId:artifactId:version


Question 37: Resources needed for generating build using pom.xml files are

Answer: Source code location, test source location and dependency details


Question 38: Command to generate Super POM view

Answer: mvn help:effective pom


Question 39: Local repository could be one on the web server

Answer: False


Question 40: Maven dependencies are stored in

Answer: repository


Question 41: Which of the flow is correct for Build life cycle

Answer: validate, compile, test, package, integrate, verify, install, deploy


Question 42: What are the three builds in maven life cycle

Answer: default,clean,site


Question 43: A build goal is peripheral for a phase when pom binds all goal to the corresponding life cycle

Answer: False


Question 44: While creating maven project, we must enter value for

Answer: I, ii, iii and iv


Question 45: Which plugin is needed to compile project

Answer: mvn-compile-plugin


Question 46: Syntax used for compiling the maven project

Answer: mvn compile


Question 47: Which plugin is needed to execute project

Answer: exec-mvn-plugin


Question 48: How to get the maven path

Answer: whereis mvn


Question 49: War files are created for  

Answer: Web Application


Question 50: Which command is used for generating Unit test reports

Answer: mvn surefire-report:report


Question 51: What does maven surefire plugins stands for

Answer: Both of the options are correct about maven surefire plugins.


Question 52: Different type of plugins

Answer: Build and Reporting Plugins.


Question 53: Syntax used to skip the test using terminal

Answer: mvn install -DskipTests


Question 54: Maven search for dependency in ___________________

Answer: local repository only


Post a comment

Comments

Join the conversation and share your thoughts! Leave the first comment.

Get your FREE PDF on "100 Ways to Try ChatGPT Today"

Generating link, please wait for: 60 seconds

Checkout all hot deals now 🔥

Search blogs

No blog posts found