Loading

How to display the project dependencies and libraries of a Mule application with Maven

Publiceringsdatum: Aug 5, 2025
Steg

QUESTION

Dependencies are resources that you use in your application. They are added in the dependencies section of the pom, which through maven are automatically downloaded with their transitive dependencies and the libraries that it needs.

You may want to check what libraries are used in a Mule application due to compliance requirements, update libraries, or any other amount of reasons.


ANSWER

1. Open a terminal in the folder of the application (where the pom.xml file is located):
➜  pwd
/Users/pcarcani/AnypointStudio/studio-workspace-7.10.0/applicationname
➜  ls
mule-artifact.json            pom.xml            src                target

2. Run the following command:
mvn dependency:tree -Dverbose
It will output the dependency tree of the libraries present in the pom.xml file, for example:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ applicationname ---
[INFO] a10f74d0-f658-4df6-84fb-32dfa1fc2597:applicationname-application:1.0.9
[INFO] +- org.mule.connectors:mule-http-connector:jar:mule-plugin:1.5.25:compile
[INFO] |  +- (org.mule.connectors:mule-sockets-connector:jar:mule-plugin:1.2.1:compile - omitted for duplicate)
[INFO] |  +- org.mule.modules:mule-module-cors-kernel:jar:1.1.2:compile
[INFO] |  \- org.apache.commons:commons-text:jar:1.8:compile
[INFO] |     \- (org.apache.commons:commons-lang3:jar:3.9:compile - omitted for conflict with 3.11)
[INFO] \- org.mule.connectors:mule-sockets-connector:jar:mule-plugin:1.2.1:compile
[INFO]    +- commons-io:commons-io:jar:2.8.0:compile
[INFO]    \- org.apache.commons:commons-lang3:jar:3.11:compile
 

ADDITIONAL INFORMATION

Please note that the command mvn dependency:tree -X, which uses the "-X" instead of the "-Dverbose" flag to display verbose information, won't work with the dependency command.
Knowledge-artikelnummer

001116779

 
Laddar
Salesforce Help | Article