Find your content:

Search form

Tutorial Learn MVN - Build the project

 
Share

How to build the project?

mvn package

It shows bunch of lines and at the end you see the below output

[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ my-app ---
[INFO] Building jar: /Users/user/dev/mavenexamples/my-app/target/my-app-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.010 s
[INFO] Finished at: 2020-05-03T08:21:59-07:00
[INFO] Final Memory: 16M/80M
[INFO] ------------------------------------------------------------------------

Basically package is called a phase. Maven has multiple phases which helps to build, test, verify the projects.

 

Life cycle phases of MVN

validate - validate the project is correct and all necessary information is available
compile - compile the source code of the project
test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package - take the compiled code and package it in its distributable format, such as a JAR.
verify - run any checks on results of integration tests to ensure quality criteria are met
install - install the package into the local repository, for use as a dependency in other projects locally
deploy - done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.

 

Phases which are not part of the life cycle

clean - Clean up artifacts created by prior builds
site - Generates site documentation for this project

 

My Block Status

My Block Content