Which command is used to build a Maven project?

Which command is used to build a Maven project?

A) mvn package
B) mvn install
C) mvn compile
D) mvn build

Answer:

A) mvn package

Explanation:

The mvn package command is used to build a Maven project. It compiles the source code, runs the tests, and packages the project into a JAR, WAR, or other specified format. The resulting package is placed in the target directory of the project.

Reference links:

https://www.javaguides.net/p/maven.html

Leave a Comment

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

Scroll to Top