Search code examples
javamavenprocessinstallationlifecycle

What is the process with Maven project to compile and test the code?


I have maven project imported in my eclipse. Now I need to start making changes to it and test it with the integration test (out of App server). Currently, the integration test is run out of server using openEJB container.

My basic question is, what is the regular process to compile, build and test with Maven?

  1. mvn install
  2. Maven -> Update Project.
  3. Run my test from command line

Is it how it is done? I am specifically interested in knowing mvn install commands. So should I do all three steps before I can test it?

Example: I just wanted to print something and see what is the output. For this I guess I need to do all these steps?

The openEJB container needs classes so it can load them.


Solution

  • Yes, mvn isntall is the most popular option. It compiles, packages and tests your project.