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.
Preference | Description | Default Value |
---|---|---|
Display runtime version not available warnings |
When enabled, it warns you when the runtime version configured in your |
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. |
Empty |
Override settings security path |
When selected, this option overrides Maven default |
Disabled |
Override Maven local repository location |
When selected, this option overrides Maven default local repository location. |
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
.
If there is no file on this path, you can create a new settings.xml
file in another location:
-
Select Override global settings path.
-
Click Browse.
-
Select your
settings.xml
file and click Open. + The IDs are listed. -
Click Apply and Close.
Configure Update Policies
You can configure Maven update policies depending on your needs.
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
.
If there is no file on this path, you can create a new settings.xml
file in another location:
-
Select Override user settings path.
-
Click Browse.
-
Select your
settings.xml
file and click Open. + The IDs are listed. -
Click Apply and Close.