- Maven:
- Used to make build
- Used to manage dependencies.
- LifeCycle of maven:
- Clean: removes target folder/Jar.
- Validate: validate if project is correct.
- Compile: compile the source code
- test: run unit test
- package: take compiled code and package it into JAR/WAR as per configured. Jar is made inside target.
- verify: runs integrations test and ensure quality criteria are met.
- install: install the package into local repository, for use as a dependency in other projects locally. Our jar will be store in the local
.m2repository to usage in other local repositories. - deploy: done in build environment, copies the final package to remote repository
- We simply use:
mvn validateormvn compileetc. to run above commands. If you do not have mvn install you can simply use a .mvnw file created ex:./mvnw validateor./mvnw compileetc.