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
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
Mike McGarr
 

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

Indianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.pptxIndianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.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)
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2
 
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
 
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
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

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