DevOps Classroom notes 24/Nov/2023

Maven

Repository

  • In Maven we have three repositories

    • Local Repository (~/.m2/repository)
    • Remote Repository: Present with in organizational boundary where we can download dependencies and store artifacts. Jfrog and Nexus can be used as Remote Repositories
    • Central Repo: Open public repository having all the public dependencies
  • Goals:

    • install: copy the artifact into local repository
    • deploy: copy the artifact into remote repository
  • Maven settings file: If we need to configure maven with remote repository location or other configuration details ~/.m2/settings.xml Refer Here for official docs

Lets build a maven project

  • Install maven
  • lets use spring petclinic Refer Here
  • Lets execute maven phases
mvn validate
mvn compile
mvn test
mvn package
mvn install
  • Compilation, test, package and install a target folder will be created

    • compile: will create .class files
    • test: will run unit tests and creates test reports in xml format
    • package: will create a jar or war file
    • install: will copy jar an pom to local repo
  • Exercise: Try building openmrs core Refer Here

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube