Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 931 Bytes

File metadata and controls

17 lines (15 loc) · 931 Bytes

Maven

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