Contact Us 1-800-596-4880

Maven Preferences Reference

In Studio, you can personalize your preferences when working with Maven. Studio reads the Maven settings.xml file, which details the configurations Maven uses during its operation. The settings.xml file enables you to tailor the behavior of the build process for all the projects on your system. With the settings.xml file, you can configure:

  • Dependency and plugin repositories

  • Proxy servers

  • Authentication

  • Plugins

See Maven setting references for additional information.

To configure Maven setting preferences, open Studio preference settings. In the Preferences panel, go to Anypoint Studio > Maven.

See Maven Reference for additional information about configuring MuleSoft repositories.

*Maven Preferences Reference* window accessed from the *Settings…​* option, from the *Anypoint Studio* menu
Preference Description Default Value

Display runtime version not available warnings

When enabled, it warns you when the runtime version configured in your pom.xml file is different from the one configured in your project.

Enabled

Use embedded Maven installation

When enabled, it uses the Maven installation embedded in Anypoint Studio.

Enabled

Maven installation home directory

The directory of your local Maven installation.
You can only edit this preference when you disable Use embedded Maven installation.

Empty

Override settings security path

When selected, this option overrides Maven default settings_security.xml path.
Selecting this option requires you to define your custom path to your settings_security.xml file in the Path to settings_security.xml field.

Disabled

Override Maven local repository location

When selected, this option overrides Maven default local repository location.
Selecting this option requires you to define your custom path to your Maven local repository.

Disabled

MAVEN_OPTS environment variable

MAVEN_OPTS contains parameters to start up the JVM or to pass memory options to Maven before it runs.

Empty

Base command line for builds

The Maven command to execute every time you build or run a Mule project in your local machine.

mvn clean package -nsu -DskipMunitTests

Configure Global Settings

Studio manages the servers used in the global settings and you can configure Studio to use an external Maven installation. By doing so, Studio automatically detects and populates the IDs from the settings.xml file stored in ${maven.installation.home}/conf/settings.xml.

“*Global Settings* option highlighted in the Studio setting preferences window”

If there is no file on this path, you can create a new settings.xml file in another location:

  1. Select Override global settings path.

  2. Click Browse.

  3. Select your settings.xml file and click Open. + The IDs are listed.

  4. Click Apply and Close.

Configure Update Policies

You can configure Maven update policies depending on your needs.

“*Update Policies* option highlighted in the Studio setting preferences window”

See the <updatePolicy> in the Repositories section of Maven Settings Reference for additional information.

Configure User Settings

Studio manages the servers for downloading dependencies or plugins, defines the credentials of such servers when needed, and automatically detects and populates the IDs from the settings.xml file located in ${user.home}/.m2/settings.xml.

“*User Settings* option highlighted in the Studio setting preferences window”

If there is no file on this path, you can create a new settings.xml file in another location:

  1. Select Override user settings path.

  2. Click Browse.

  3. Select your settings.xml file and click Open. + The IDs are listed.

  4. Click Apply and Close.

Add a Server

To add a new server to your settings.xml file:

  1. In the User Settings window, click Add.

  2. Enter the server ID, and your username and password.

  3. Click OK.

“*Add server* option highlighted in the Studio setting preferences window”