30 likes | 181 Vues
This guide delves into Maven repository management, focusing on local and central repositories, and the importance of correctly setting up your build environments. It explains the structure of Maven projects, including the significance of local repositories, archetypes, artifacts, and how to handle different distribution types using profiles. Learn how to configure your POM files effectively with various profiles for different environments like DEV, STAGING, and PRODUCTION. This knowledge is essential for seamless builds and distributions across multiple machines.
E N D
Central Repository (repo1.maven.org) Search Technologies Maven Repository (Mirror) Someone Else’s Machine Local Machine Local Repository (/users/you/.m2) Local Repository (/users/you/.m2) Project Project B Project target Project B target target target
Maven Archetype Maven Project Maven Artifacts (aka Jar) builds builds template
Maven Distribution Archetype Maven Distribution Project Distribution (aka directories and files) PRODUCTION builds assembles Distribution (aka directories and files) DEV “distribution-files” (distribution template) POM (contains multiple profiles Template Distribution (aka directories and files) STAGING • Maven “profile” • Sets different settings / properties • for each distribution type • For example: • Assembly a distribution with the “dev” profile • All of the DEV server names, and DB names Distribution (aka directories and files) TEST