Find your content:

Search form

Tutorial Learn MVN - What happen when you run any phase command

 
Share

Lets say I am running the below command,

mvn compile

internally mvn does the following tasks before execute the compile

validate
generate-sources
process-sources
generate-resources
process-resources

once all the above process is completed then it executes the mvn compile.

How to test the package?

You may test the newly compiled and packaged JAR with the following command:

java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App

It prints the below output

Hello World!

 

My Block Status

My Block Content