Loading

MuleSoft How to Setup Maven for macOS

Julkaisupäivä: Mar 6, 2026
Tehtävä

How to setup Maven in macOS for Mule applications.

Vaiheet

To setup Maven on macOS for Mule applications perform the following:

1. Download maven from the link below:
     https://maven.apache.org/download.cgi — file - apache-maven-3.8.6-bin.zip (whatever latest version)

2. Extract the zip in users folder.

3. Edit .zshrc file in your mac. If you do not have, you can create a file with extension .zshrc
    - Contents for the .zshrc file:      

JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home" (Put your own jdk path)
PATH="${JAVA_HOME}/bin:${PATH}"
export PATH

       

export M2_HOME="/Users/{userName}/apache-maven-3.8.6" (Put your own maven path)
PATH="${M2_HOME}/bin:${PATH}"
export PATH


NOTE: You can find the java installed in your system through this command:

/usr/libexec/java_home -V


4. Verify the java home using the below command:  

$ java -version


5. Verify m2 home using the below command:

$ mvn -version


6. Try to run the mvn script through normal terminal and check the security setting in MAC whether it is blocking the execution. Click on Open Anyway.

7. Quit the terminal and save everything.

8. Run a fresh session and type mvn -v to check if you get the details of the maven installed. 

Lisäresurssit

Maven Support in Mule

Knowledge-artikkelin numero

001115431

 
Ladataan
Salesforce Help | Article