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

PDF
KNN Algorithm Using R | Edureka
PDF
Observability & Datadog
PPTX
Microsoft azure
PPTX
Cloud computing ppt
PPTX
Overview of Azure Arc enabled Kubernetes
PDF
VM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlue
PDF
GitOps with Amazon EKS Anywhere by Dan Budris
PPTX
AWS PPT.pptx
KNN Algorithm Using R | Edureka
Observability & Datadog
Microsoft azure
Cloud computing ppt
Overview of Azure Arc enabled Kubernetes
VM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlue
GitOps with Amazon EKS Anywhere by Dan Budris
AWS PPT.pptx

What's hot (20)

PDF
Introduction to Google Cloud Platform and APIs
PDF
Azure stack all you need to know
PPTX
Introduction to Aneka, Aneka Model is explained
PPTX
Migration into a Cloud
PDF
“Houston, we have a model...” Introduction to MLOps
PPTX
Big Data Helsinki v 3 | "Federated Learning and Privacy-preserving AI" - Oguz...
PDF
Best Practices for Streaming IoT Data with MQTT and Apache Kafka®
PDF
Naive Bayes
PPT
Software Engineering (Project Management )
PPTX
Introduction to CI/CD
PDF
Moving a Monolith to Kubernetes
PPTX
Jenkins CI
PPSX
Data Mining Tools / Orange
PPTX
Federated Learning: ML with Privacy on the Edge 11.15.18
PDF
Cloud Native Debugging in Production - Dig Deep into your agents
PDF
Cloud-Native Security
PDF
Red Hat OpenStack - Open Cloud Infrastructure
PPTX
Data preprocessing in Machine learning
PPTX
PPTX
Data clustring
Introduction to Google Cloud Platform and APIs
Azure stack all you need to know
Introduction to Aneka, Aneka Model is explained
Migration into a Cloud
“Houston, we have a model...” Introduction to MLOps
Big Data Helsinki v 3 | "Federated Learning and Privacy-preserving AI" - Oguz...
Best Practices for Streaming IoT Data with MQTT and Apache Kafka®
Naive Bayes
Software Engineering (Project Management )
Introduction to CI/CD
Moving a Monolith to Kubernetes
Jenkins CI
Data Mining Tools / Orange
Federated Learning: ML with Privacy on the Edge 11.15.18
Cloud Native Debugging in Production - Dig Deep into your agents
Cloud-Native Security
Red Hat OpenStack - Open Cloud Infrastructure
Data preprocessing in Machine learning
Data clustring
Ad

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

PPTX
Ci jenkins maven svn
PDF
Fundamental of apache maven
PDF
Apache maven
PPTX
Jenkins advance topic
PPTX
Apache Maven
PPTX
Learning Maven by Example
DOC
Khaleel Devops Resume (2)
PDF
Build Automation using Maven
PDF
Docker + Microservices in Production
PPTX
Session 2
PPTX
Session 2
PPTX
Real World Enterprise Reactive Programming using Vert.x
PDF
Dev Ops
PDF
Kubernetes Intro
PPTX
Real World Enterprise Reactive Programming using Vert.x
PPTX
Vagrant to-aws-flow
PDF
Practical maven-slides 2
PDF
Mavennotes.pdf
PDF
Application Deployment on Openstack
Ci jenkins maven svn
Fundamental of apache maven
Apache maven
Jenkins advance topic
Apache Maven
Learning Maven by Example
Khaleel Devops Resume (2)
Build Automation using Maven
Docker + Microservices in Production
Session 2
Session 2
Real World Enterprise Reactive Programming using Vert.x
Dev Ops
Kubernetes Intro
Real World Enterprise Reactive Programming using Vert.x
Vagrant to-aws-flow
Practical maven-slides 2
Mavennotes.pdf
Application Deployment on Openstack
Ad

Recently uploaded (20)

PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
top salesforce developer skills in 2025.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
assetexplorer- product-overview - presentation
PPTX
L1 - Introduction to python Backend.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Transform Your Business with a Software ERP System
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Nekopoi APK 2025 free lastest update
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
System and Network Administration Chapter 2
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Upgrade and Innovation Strategies for SAP ERP Customers
top salesforce developer skills in 2025.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Computer Software and OS of computer science of grade 11.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
assetexplorer- product-overview - presentation
L1 - Introduction to python Backend.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Transform Your Business with a Software ERP System
CHAPTER 2 - PM Management and IT Context
Odoo Companies in India – Driving Business Transformation.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Nekopoi APK 2025 free lastest update
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
System and Network Administration Chapter 2

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