SlideShare une entreprise Scribd logo
1  sur  52
Wednesday 27th September 2023
Brisbane MuleSoft Meetup Group
MuleSoft, Maven and Managing Dependencies (Part
1: Basics)
2
● 5:00 PM - Registration / Networking
● 5:15 PM - Introduction and announcements
● 5:30 PM - MuleSoft Maven and Managing Dependencies
● 6:15 PM - Wrap Up
Agenda
MuleSoft Product Announcements
Announcements
4
Skill up with new MuleSoft Trailhead Badges
Organizers, Sponsors, and Speakers
Intorductions
6
Organizers
Want to do a MuleSoft Meetup Talk? Reach out to our event organizers 
Nicholas ip
Senior Consultant at
MuleSoft | MuleSoft
Meetup Leader
Ryan Andal
MuleSoft
Ambassador |
Architect | TOGAF®
9 | AWS | Azure |
Associate Manager -
MuleSoft at
Capgemini
Brian Fraser
MuleSoft
Ambassador and
Meetup Leader |
Senior Integration
Consultant and
Manager at
Capgemini
Fuguo Wei
Principal Integration
Architect at
Cloudwerx |
MuleSoft Mentor |
MuleSoft Meetup
Leader
7
Sponsors
Check out our Sponsors
Capgemini
Capgemini is a global consulting and technology services company that
empowers businesses through comprehensive services, innovative solutions, and
a strong focus on digital transformation, helping them thrive in the digital age.
8
Speakers
Want to know more about our speakers? Check them out.
Gaurav Dubey
● MuleSoft Developer at Capgemini
● MuleSoft Mentor and MuleSoft Meetup Leader in both Nagpur and Goa
● 10+ years of experience in IT with human first approach.
MuleSoft, Maven and Managing Dependencies
(Part 1: Basics)
10
● Maven is a tool that can be used for building and managing any
Java-based project
What is Maven?
11
● Make the build process easy
● Provide a uniform build system
● Provide quality project information
● Encourage better development practices
Maven’s Objectives
12
● Yes
● No
Do we need to install Maven while working with
MuleSoft?
13
Where is Maven in Anypoint Studio?
14
● Download:
https://maven.apache.org/download.cgi
● Install:
https://maven.apache.org/install.html
Still want to install it locally?
15
● It builds your application (along with necessary details) by following
the build lifecycle
What does Maven actually do?
16
● Clean : Project Cleaning
● Site : Project Website
● Default : Project Deployment
Build Lifecycle
17
● Cleans the project
● Removes all build artifacts from working directory
Clean Lifecycle
18
● Creates the website for your project
Site Lifecycle
19
● validate : validate the project is correct and all necessary
information is available
● compile : compile the source code of the project
Default Lifecycle Phases
20
● test : test the compiled source code using a suitable unit
testing framework. These tests should not require
the code be packaged or deployed
● package : take the compiled code and package it in its
distributable format, such as a JAR
Default Lifecycle Phases
21
● verify : run any checks on results of integration tests to
ensure quality criteria are met
● install : install the package into the local repository, for use
as a dependency in other projects locally
Default Lifecycle Phases
22
● deploy : done in the build environment, copies the final
package to the remote repository for sharing with
other developers and projects.
Default Lifecycle Phases
23
<phases>
<phase>validate</phase>
<phase>initialize</phase>
<phase>generate-sources</phase>
<phase>process-sources</phase>
<phase>generate-resources</phase>
<phase>process-resources</phase>
<phase>compile</phase>
<phase>process-classes</phase>
<phase>generate-test-sources</phase>
<phase>process-test-sources</phase>
<phase>generate-test-resources</phase>
<phase>process-test-resources</phase>
Default Lifecycle Phases
24
<phase>test-compile</phase>
<phase>process-test-classes</phase>
<phase>test</phase>
<phase>prepare-package</phase>
<phase>package</phase>
<phase>pre-integration-test</phase>
<phase>integration-test</phase>
<phase>post-integration-test</phase>
<phase>verify</phase>
<phase>install</phase>
<phase>deploy</phase>
</phases>
Default Lifecycle Phases
25
26
● POM
How is Maven achieving all this?
27
● POM is a fundamental unit of work in Maven
● It is an XML file that contains information about the project and
configuration details used by Maven to build the project
Project Object Model
28
● project – root
● modelVersion – should be set to 4.0.0
● groupId – the id of the project’s group
● artifactId – the id of the artifact (project)
● version – the version of the artifact under the specified group
Minimal POM
29
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
</project>
Example of Minimal POM
30
Mule Project POM
31
● All models implicitly inherit from a super-POM
https://maven.apache.org/ref/3.6.3/maven-model-builder/super-
pom.html
Super POM
32
Demo 1
33
mvn archetype:generate -DgroupId=com.mycompany.app -
DartifactId=my-demo-app4 -DarchetypeArtifactId=maven-archetype-
quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
Creating a Maven based project using commands
34
<packaging>mule-application</packaging>
Creating a Maven based project using commands
35
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
https://maven.apache.org/plugins/maven-clean-plugin/
maven clean plugin
36
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>3.5.4</version>
<extensions>true</extensions>
</plugin>
https://docs.mulesoft.com/mule-runtime/4.4/mmp-concept
mule maven plugin
37
● maven-resources-plugin
● maven-compiler-plugin
● maven-surefire-plugin
more plugins …
38
An artifact which your maven project depends on:
● JAR
● POM
Dependency Mechanism
39
● Local
● Central
○ https://repo1.maven.org/maven2/
● Remote
Maven Repositories
40
Maven Repositories
Credit: John Thompson
41
● target folder
Build Directory
42
● src/main/java
● src/main/mule
Source Directory
43
● src/test/java
● src/test/munit
Test Directory
44
● It contains maven build configuration that are not specific to a mule
application
● It has below advantages
○ Reduce redundancy
○ Minimize conflicting versions
○ Streamline dependency upgrade process
Parent POM
45
Parent POM
46
<packaging>pom</packaging>
Parent POM
47
<parent>
<groupId>com.mycompany</groupId>
<artifactId>demo-parent-pom1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
Parent POM
48
● Maven Documentation
● MuleSoft Documentation
● Dependency Management: Friends of Max Demonstration
https://www.youtube.com/watch?v=tvhUV7uct68
References
Q&A time!
49
What’s Next
Introduce yourself to your neighbor
Networking time
Thank you

Contenu connexe

Similaire à Brisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptx

Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Mike McGarr
 
Creating MuleSoft API Template Project Using Maven Archetype
Creating MuleSoft API Template Project Using Maven ArchetypeCreating MuleSoft API Template Project Using Maven Archetype
Creating MuleSoft API Template Project Using Maven ArchetypeManish Kumar Yadav
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2NitushreeJena
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...Jitendra Bafna
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Mike McGarr
 
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Alexandra N. Martinez
 
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptxMuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptxAnuragSharma900
 
#11 DataWeave Extension Library using Visual Studio Code
#11 DataWeave Extension Library using Visual Studio Code#11 DataWeave Extension Library using Visual Studio Code
#11 DataWeave Extension Library using Visual Studio CodeAnoopRamachandran13
 
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptxAnoopRamachandran13
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingAcquia
 
First Caracas MuleSoft Meetup Slides
First Caracas MuleSoft Meetup SlidesFirst Caracas MuleSoft Meetup Slides
First Caracas MuleSoft Meetup SlidesFernando Silva
 
MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021Nagaraju K R
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsVMware Tanzu
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0Eric Wendelin
 
NI Package Manager
NI Package ManagerNI Package Manager
NI Package ManagerDMC, Inc.
 

Similaire à Brisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptx (20)

Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)
 
Creating MuleSoft API Template Project Using Maven Archetype
Creating MuleSoft API Template Project Using Maven ArchetypeCreating MuleSoft API Template Project Using Maven Archetype
Creating MuleSoft API Template Project Using Maven Archetype
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2
 
Maven
MavenMaven
Maven
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)
 
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
 
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptxMuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
 
#11 DataWeave Extension Library using Visual Studio Code
#11 DataWeave Extension Library using Visual Studio Code#11 DataWeave Extension Library using Visual Studio Code
#11 DataWeave Extension Library using Visual Studio Code
 
UiPath Devops.pptx
UiPath Devops.pptxUiPath Devops.pptx
UiPath Devops.pptx
 
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
 
First Caracas MuleSoft Meetup Slides
First Caracas MuleSoft Meetup SlidesFirst Caracas MuleSoft Meetup Slides
First Caracas MuleSoft Meetup Slides
 
MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native Applications
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
NI Package Manager
NI Package ManagerNI Package Manager
NI Package Manager
 
Mule soft indore meetup 2
Mule soft indore meetup 2Mule soft indore meetup 2
Mule soft indore meetup 2
 

Dernier

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Dernier (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Brisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptx