DevOps Classroom notes 15/Jul/2026

JAVA application build

  • maven
  • gradle
  • ant

Maven build tool for java to generate jar or war file

  • Java version : 17
  • maven

maven cli cmds:

  • mvn clean – clean your code
  • mvn install – download all packages mention in pom.xml
  • mvn test – install dependency and run tests (sure-fire-reports)
  • mvn package – install dependency , run tests and build package (jar/war file)
  • mvn deploy – install dependency , run tests, build package and publish artifacts
  • mvn clean install, mvn clean package, mvn clean tests, mvn clean deploy

maven repo

  • local repo .m2 folder
  • repo maven central repo
  • org repo like jfrog, nexus …etc

DO manual build package for sample application

sudo apt-get install openjdk-17-jdk -y 
sudo apt install maven -y
git clone https://github.com/spring-projects/spring-petclinic.git

cd spring-petclinic/

mvn clean package 

ls target

jar file path: target/spring-petclinic-4.0.0-SNAPSHOT.jar

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%