SlideShare a Scribd company logo
Maven Zero to Hero with
AWS CodeCommit,
CodeArtifact, ECR,
OWASP Dependency Track
Ravi Soni
linkedin.com/in/rvsoni/
Agenda
❖ History of Build System
❖ Overview of Maven
❖ Internals working of Maven (GAV, Phases, Goals, Plugins, Packaging, Profiles)
❖ Maven Repository (m2 repo)
❖ Setup and running Maven Hello World
❖ Overview AWS CodeCommit, CodeArtifact, ECR
❖ Setup of AWS CodeCommit, CodeArtifact, ECR and use with Maven
❖ Maven Release process with AWS CodeCommit, CodeArtifact, ECR
❖ Cool things I have build using Maven
❖ Overview/Talk on some important maven plugins
❖ Best practices of using Maven
❖ Q/A
History of Build System
● Initial concepts derived from a Make build system used on Solaris/Unix
● Birth of Ant build tool
● Birth of Maven build tool
Maven Overview
● Started as a side project of Apache Turbine
● How software is build and dependency managed
● Plugin based system
● Introduced GAV coordinates for dependency management
● Folder structure
● Introduction of build lifecycle
Maven Folder structure
Walking with Maven POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rvsoni.app</groupId>
<artifactId>app-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>app-demo</name>
<description>Demo project for Maven</description>
<properties>
<java.version>11</java.version>
</properties>
<!--
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
-->
</project>
Walking with Maven (Multi Module) POM.xml
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>service</artifactId>
<packaging>jar</packaging>
<description>Demo project for Maven</description>
<parent>
<groupId>com.rvsoni.app</groupId>
<artifactId>multi-module-app-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.rvsoni.app</groupId>
<artifactId>jpa</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.rvsoni.app</groupId>
<artifactId>multi-module-app-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven multi-module App Demo</name>
<properties>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<spring-boot.version>2.6.7</spring-boot.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Spring Boot BOM -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>jpa</module>
<module>service</module>
<module>web</module>
</modules>
</project>
Maven Lifecycle
● Packaging
● Phases
● Plugins
● Goals
● Dependency
● Profiles
● Distribution Management
Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency Track
Maven Packaging
● Various packaging types support
○ EJB, EJB3, JAR, EAR, PAR, RAR, WAR, POM, Maven-plugin
○ Custom Packaging type, i.e hpi (Jenkins plugin)
● Default Packaging type is JAR
● Packaging type enable various phases of build lifecycle phases
Maven Phase
● Maven lifecycle are based on the phase
● Phase associated with Plugin Goals
● Packaging type define lifecycle phases
● Phases named with hyphenated-words (pre-*, post-*, or process-*)
Maven Plugins and Goals
● Plugin is heart of Maven Build system
● Each Plugin provide one or more goals
● Goals are need to map with Phase to be executed
● Some plugin goal is pre mapped with phase
Maven Dependency and BOM
● Dependency management is a core feature of Maven
● Direct/Transitive Dependency
● Dependency scope (compile, Provided, Runtime, Test, System, Import)
● Bill of Materials (BOM)
○ A Collection of dependency
○ Best way to manage Dependency with in different project
Maven Profiles
● A set of Maven configuration
● Can be activated on demand or automaticaly
● Help to modularize Maven build process
● Define at
○ Per Project (pom.xml)
○ Per User (%USER_HOME%/.m2/settings.xml)
○ Per Global (${maven.home}/conf/settings.xml)
Maven Repository
● Central place to store and retrieve artifacts of dependency/plugins
● Artifact categorize as Snapshot or Release
● Local repository (~/.m2)
● Remote repository (https://repo.maven.apache.org)
● 3rd Party Repository proxy software
○ Sonatype Nexus
○ JFrog Artifactory
○ AWS CodeArtifact
Maven
Hello World!
AWS CodeCommit
● A Hosted Git repository service provided by AWS
● Access control setup using AWS IAM
● Easy to integrate with other AWS Services
AWS CodeArtifact
● A Hosted repository service provided by AWS
● Support Maven, NPM, PyPI..
● Access control setup using AWS IAM
● Easy to integrate with other AWS Services
● Securly access package with in VPC (VPC PrivateLink Endpoint)
AWS ECR
● A Hosted Container repository service provided by AWS
● Access control setup using AWS IAM
● Easy to integrate with other AWS Services
● Pull through cache repositories
AWS
CodeCommit,
CodeArtifact, ERC
Hello World!
Maven Release process
● Overview of Release process
● Maven Release process tasks
○ Project verification for ready to release.
○ Code tagging
○ Version management
○ Project building
○ Release artifact deployment to repository
○ Prepare for the next development version
Maven Release
process with AWS
CodeCommit,
CodeArtifact, ECR
Hello World!
Cool things I have build using Maven
● Count a total line of Code
○ github.com/AlDanial/cloc
● Software bill of material generation
○ CycloneDX (SBOM format)
● Dependency Track Integration
○ Continues vulnerability scanning and alerting
○ Software Supply chain attack
○ Open source license management with SPDX
● License Finder Integration
○ github.com/pivotal/LicenseFinder
Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency Track
List of cool Maven plugins
● Maven-antrun-plugin
● Maven-assembly-plugin
● Maven-enforcer-plugin
● Jib-maven-plugin
● Sql-maven-plugin
● Exec-maven-plugin
● Groovy-maven-plugin
● Cyclonedx-maven-plugin
● Spring-boot-maven-plugin
Maven Best practices
● Separate dependency and build lifecycle
● Increase usage of Maven Dependency BOM
● Use of Parent pom
● Add dependency management on parent pom for Multi Module project
● Always define version on plugins
● Make a use of Profile
Thanks!
Ravi Soni
linkedin.com/in/rvsoni

More Related Content

What's hot (20)

PDF
Image Scanning Best Practices for Containers and Kubernetes
DevOps.com
 
PPTX
AWS Transit Gateway-Benefits and Best Practices
John Varghese
 
PDF
Api observability
Red Hat
 
PDF
Implementing Observability for Kubernetes.pdf
Jose Manuel Ortega Candel
 
PDF
Introduction to Resilience4j
Knoldus Inc.
 
PDF
MuleSoft Sizing Guidelines - VirtualMuleys
Angel Alberici
 
PDF
Cloud Computing Using OpenStack
Bangladesh Network Operators Group
 
PPTX
Service mesh
Arnab Mitra
 
PPT
Making Apache Tomcat Multi-tenant, Elastic and Metered
Paul Fremantle
 
PDF
Event Driven Architecture (EDA) Reference Architecture
Bob Rhubart
 
PDF
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
PPTX
Oracle Database Cloud Service
Jean-Philippe PINTE
 
PPTX
Terraform
Pathum Fernando ☁
 
PPTX
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 
PPTX
Introduction to Apache Kafka
AIMDek Technologies
 
KEY
Event Driven Architecture
Stefan Norberg
 
PDF
OpenTelemetry Introduction
DimitrisFinas1
 
PDF
Kubernetes Networking
CJ Cullen
 
PDF
How we can do Multi-Tenancy on Kubernetes
Opsta
 
PDF
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Imma Valls Bernaus
 
Image Scanning Best Practices for Containers and Kubernetes
DevOps.com
 
AWS Transit Gateway-Benefits and Best Practices
John Varghese
 
Api observability
Red Hat
 
Implementing Observability for Kubernetes.pdf
Jose Manuel Ortega Candel
 
Introduction to Resilience4j
Knoldus Inc.
 
MuleSoft Sizing Guidelines - VirtualMuleys
Angel Alberici
 
Cloud Computing Using OpenStack
Bangladesh Network Operators Group
 
Service mesh
Arnab Mitra
 
Making Apache Tomcat Multi-tenant, Elastic and Metered
Paul Fremantle
 
Event Driven Architecture (EDA) Reference Architecture
Bob Rhubart
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
Oracle Database Cloud Service
Jean-Philippe PINTE
 
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 
Introduction to Apache Kafka
AIMDek Technologies
 
Event Driven Architecture
Stefan Norberg
 
OpenTelemetry Introduction
DimitrisFinas1
 
Kubernetes Networking
CJ Cullen
 
How we can do Multi-Tenancy on Kubernetes
Opsta
 
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Imma Valls Bernaus
 

Similar to Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency Track (20)

PDF
Maven
Jyothi Malapati
 
PDF
Maven
Jyothi Malapati
 
PPTX
20091112 - Mars Jug - Apache Maven
Arnaud Héritier
 
PDF
Apache maven, a software project management tool
Renato Primavera
 
PPTX
Introduction to maven
Manos Georgopoulos
 
PDF
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
PDF
Java Builds with Maven and Ant
David Noble
 
PPTX
Maven
Emprovise
 
PDF
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
PPT
MAVEN
shayan n
 
PDF
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
PPSX
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
PDF
A-Z_Maven.pdf
Mithilesh Singh
 
PPTX
Maven Basics - Explained
Smita Prasad
 
PPTX
Version Management in Maven
Geert Pante
 
PPTX
Maven advanced
Smita Prasad
 
PPT
Introduction tomaven
Manav Prasad
 
PPTX
How maven makes your development group look like a bunch of professionals.
Fazreil Amreen Abdul Jalil
 
PDF
Mavennotes.pdf
AnkurSingh656748
 
20091112 - Mars Jug - Apache Maven
Arnaud Héritier
 
Apache maven, a software project management tool
Renato Primavera
 
Introduction to maven
Manos Georgopoulos
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Java Builds with Maven and Ant
David Noble
 
Maven
Emprovise
 
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
MAVEN
shayan n
 
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
A-Z_Maven.pdf
Mithilesh Singh
 
Maven Basics - Explained
Smita Prasad
 
Version Management in Maven
Geert Pante
 
Maven advanced
Smita Prasad
 
Introduction tomaven
Manav Prasad
 
How maven makes your development group look like a bunch of professionals.
Fazreil Amreen Abdul Jalil
 
Mavennotes.pdf
AnkurSingh656748
 
Ad

Recently uploaded (20)

PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Tally software_Introduction_Presentation
AditiBansal54083
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Ad

Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency Track

  • 1. Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency Track Ravi Soni linkedin.com/in/rvsoni/
  • 2. Agenda ❖ History of Build System ❖ Overview of Maven ❖ Internals working of Maven (GAV, Phases, Goals, Plugins, Packaging, Profiles) ❖ Maven Repository (m2 repo) ❖ Setup and running Maven Hello World ❖ Overview AWS CodeCommit, CodeArtifact, ECR ❖ Setup of AWS CodeCommit, CodeArtifact, ECR and use with Maven ❖ Maven Release process with AWS CodeCommit, CodeArtifact, ECR ❖ Cool things I have build using Maven ❖ Overview/Talk on some important maven plugins ❖ Best practices of using Maven ❖ Q/A
  • 3. History of Build System ● Initial concepts derived from a Make build system used on Solaris/Unix ● Birth of Ant build tool ● Birth of Maven build tool
  • 4. Maven Overview ● Started as a side project of Apache Turbine ● How software is build and dependency managed ● Plugin based system ● Introduced GAV coordinates for dependency management ● Folder structure ● Introduction of build lifecycle
  • 6. Walking with Maven POM.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.rvsoni.app</groupId> <artifactId>app-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>app-demo</name> <description>Demo project for Maven</description> <properties> <java.version>11</java.version> </properties> <!-- <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> </dependency> </dependencies> --> </project>
  • 7. Walking with Maven (Multi Module) POM.xml <project> <modelVersion>4.0.0</modelVersion> <artifactId>service</artifactId> <packaging>jar</packaging> <description>Demo project for Maven</description> <parent> <groupId>com.rvsoni.app</groupId> <artifactId>multi-module-app-demo</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <dependencies> <dependency> <groupId>com.rvsoni.app</groupId> <artifactId>jpa</artifactId> <version>${project.version}</version> </dependency> </dependencies> </project> <project> <modelVersion>4.0.0</modelVersion> <groupId>com.rvsoni.app</groupId> <artifactId>multi-module-app-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>Maven multi-module App Demo</name> <properties> <java.version>11</java.version> <maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.target>${java.version}</maven.compiler.target> <spring-boot.version>2.6.7</spring-boot.version> </properties> <dependencyManagement> <dependencies> <!-- Spring Boot BOM --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <modules> <module>jpa</module> <module>service</module> <module>web</module> </modules> </project>
  • 8. Maven Lifecycle ● Packaging ● Phases ● Plugins ● Goals ● Dependency ● Profiles ● Distribution Management
  • 10. Maven Packaging ● Various packaging types support ○ EJB, EJB3, JAR, EAR, PAR, RAR, WAR, POM, Maven-plugin ○ Custom Packaging type, i.e hpi (Jenkins plugin) ● Default Packaging type is JAR ● Packaging type enable various phases of build lifecycle phases
  • 11. Maven Phase ● Maven lifecycle are based on the phase ● Phase associated with Plugin Goals ● Packaging type define lifecycle phases ● Phases named with hyphenated-words (pre-*, post-*, or process-*)
  • 12. Maven Plugins and Goals ● Plugin is heart of Maven Build system ● Each Plugin provide one or more goals ● Goals are need to map with Phase to be executed ● Some plugin goal is pre mapped with phase
  • 13. Maven Dependency and BOM ● Dependency management is a core feature of Maven ● Direct/Transitive Dependency ● Dependency scope (compile, Provided, Runtime, Test, System, Import) ● Bill of Materials (BOM) ○ A Collection of dependency ○ Best way to manage Dependency with in different project
  • 14. Maven Profiles ● A set of Maven configuration ● Can be activated on demand or automaticaly ● Help to modularize Maven build process ● Define at ○ Per Project (pom.xml) ○ Per User (%USER_HOME%/.m2/settings.xml) ○ Per Global (${maven.home}/conf/settings.xml)
  • 15. Maven Repository ● Central place to store and retrieve artifacts of dependency/plugins ● Artifact categorize as Snapshot or Release ● Local repository (~/.m2) ● Remote repository (https://repo.maven.apache.org) ● 3rd Party Repository proxy software ○ Sonatype Nexus ○ JFrog Artifactory ○ AWS CodeArtifact
  • 17. AWS CodeCommit ● A Hosted Git repository service provided by AWS ● Access control setup using AWS IAM ● Easy to integrate with other AWS Services
  • 18. AWS CodeArtifact ● A Hosted repository service provided by AWS ● Support Maven, NPM, PyPI.. ● Access control setup using AWS IAM ● Easy to integrate with other AWS Services ● Securly access package with in VPC (VPC PrivateLink Endpoint)
  • 19. AWS ECR ● A Hosted Container repository service provided by AWS ● Access control setup using AWS IAM ● Easy to integrate with other AWS Services ● Pull through cache repositories
  • 21. Maven Release process ● Overview of Release process ● Maven Release process tasks ○ Project verification for ready to release. ○ Code tagging ○ Version management ○ Project building ○ Release artifact deployment to repository ○ Prepare for the next development version
  • 22. Maven Release process with AWS CodeCommit, CodeArtifact, ECR Hello World!
  • 23. Cool things I have build using Maven ● Count a total line of Code ○ github.com/AlDanial/cloc ● Software bill of material generation ○ CycloneDX (SBOM format) ● Dependency Track Integration ○ Continues vulnerability scanning and alerting ○ Software Supply chain attack ○ Open source license management with SPDX ● License Finder Integration ○ github.com/pivotal/LicenseFinder
  • 25. List of cool Maven plugins ● Maven-antrun-plugin ● Maven-assembly-plugin ● Maven-enforcer-plugin ● Jib-maven-plugin ● Sql-maven-plugin ● Exec-maven-plugin ● Groovy-maven-plugin ● Cyclonedx-maven-plugin ● Spring-boot-maven-plugin
  • 26. Maven Best practices ● Separate dependency and build lifecycle ● Increase usage of Maven Dependency BOM ● Use of Parent pom ● Add dependency management on parent pom for Multi Module project ● Always define version on plugins ● Make a use of Profile