Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More

How to add Maven CLI Options on Anypoint Studio

Publish Date: Aug 6, 2025
Task

GOAL

Add Maven CLI Options on Anypoint Studio, such as mvn -X
This applies to Anypoint Studio 7.x , 6.x
A complete listing of available Command line options for Maven can be found here: https://maven.apache.org/ref/3.6.3/maven-embedder/cli.html
When providing information to MuleSoft Support related to Maven issues we would generally require the usage of at least the -X (Produce execution debug output) and -e (Produce execution error messages) options.

Steps

In order to add Maven Command-Line Interface (CLI) Options or Arguments on Anypoint Studio such as mvn -X, please follow the next steps:

  1. Open Anypoint Studio.
  2. Go to Studio Preference then filter on Anypoint Studio -> Maven.
  3. Change the value of the parameter “Base Command line for builds” to add the Maven CLI Options or Arguments you want to use.
    User-added image
  4. Click "Apply and Close".

As an example, if you add -X the console on Anypoint Studio will show the following additional DEBUG messages.

The Console log BEFORE adding -X
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< xxx >-----------------
[INFO] Building Mule xxx

The Console log AFTER adding -X

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T04:41:47+10:00)
Maven home: /usr/local/opt/apache-maven-3.6.0
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre
...
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for ~/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1570877, ...
[DEBUG] org.mule.tools.maven:mule-app-maven-plugin:jar:1.2:
...
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: xxx
...
[INFO]
[INFO] ----------------< xxx >-----------------
[INFO] Building Mule xxx
Knowledge Article Number

001117038

 
Loading
Salesforce Help | Article