Maven Overview

Last Updated on: January 21, 2021 am

Maven Overview

  • Dependency Management
  • Building and Running your project
  • Standard directory structure

POM File

Project Object Model file: POM file

Structure

Project Meta Data

  • Project name, version
  • Output file type: JAR and WAR

Dependencies

  • List of projects we depend on

Plug-ins

  • Addtional custom tasks to run:
  • Generate JUnit test report

Project Coordiantes

GroupId

Name of company, group or organization.

ArtifactId

Name of this project: myApp

Version

A specific release version like 1.0, 1.6..

If the project is still under active development then: 1.0-SNAPSHOT.

1
2
3
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.5.5.RELEASE</version>

Maven Archetypes

Archetype:= starer project

Most Common Ones

  • maven-archetype-quickstart
  • maven-archetype-webapp

Maven Repositories Overview

Maven Repositories

Local

Mac / Linux: ~/.m2/repository

Remote

Remote Repo

Private

Set up your own Maven Repository and

  • Secure it with credentials: id/password

Repo Manager Products

  • Archiva - Apache
  • Artifactory - JFrog
  • Nexus - Sonatype

Reference: Udemy, Spring & Hibernate for Beginners (including SpringBoot)