---
schema_version: "1"
id: 768cc4153fc04b08d535b8a451605882bcf967260ebbda89ddd5eab0b229675a
title: Maven Settings in Anypoint Code Builder
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-code-builder/ref-acb-maven.md
canonical_url: https://docs.mulesoft.com/anypoint-code-builder/ref-acb-maven
source_site: docs.mulesoft.com
content_type: documentation
content_hash: fd2c9b8d41bb35f94ce644bc7126f87884e0db64f58bafdf5dd0ec176e2ecc04
description: MuleSoft Documentation Site
latest: true
---
---
product: Anypoint Code Builder
version: master
---

# Maven Settings in Anypoint Code Builder

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Code Builder uses Apache Maven to build and manage your Mule projects (implementation and
integration projects) and API specifications in design projects. All Maven configurations, such as
custom repositories, proxies, and server credentials, are managed through a central `settings.xml`
file.

For information about the Maven file `settings.xml`, see the
[Maven documentation](https://maven.apache.org/settings.html).

Maintain the `pom.xml` file to ensure build reproducibility and pipeline stability: pin fixed
dependency versions instead of using dynamic ranges, avoid `SNAPSHOT` dependencies within release
branches, and execute `mvn clean package` to validate the build locally before pushing changes.

## Maven Settings File in Anypoint Code Builder

Use the Apache Maven file `settings.xml` to configure the Maven settings, such as repositories,
proxy settings, and credentials. For detailed information, see
[Settings Reference](https://maven.apache.org/settings.html) in the Apache Maven documentation.

If `settings.xml` isn’t found in that path, Anypoint Code Builder creates an empty `settings.xml`
file in the default location, `${user.home}/.m2/repository`.

## User and Internal Maven Settings in Anypoint Code Builder

Anypoint Code Builder reads its configuration from your Maven `settings.xml` file. To configure
Maven, for example, to add repositories, proxies, or credentials, edit your `settings.xml` file,
usually located in your `~/.m2/` directory.

If you troubleshoot a project in Anypoint Code Builder, export the file with any sensitive
information, such as passwords, obfuscated. See
[Export Troubleshooting Information](https://docs.mulesoft.com/anypoint-code-builder/troubleshooting#export-troubleshooting-info) for instructions.

## Authenticating to MuleSoft Repositories

When you open a MuleSoft project that uses dependencies from the MuleSoft Enterprise Repository,
Maven requires authentication to download the artifacts. If authentication is not configured, you
receive a 401 Unauthorized error.

To configure authentication:

1.  If you don’t already have Nexus enterprise credentials, contact
    [MuleSoft Support](https://help.mulesoft.com) to request them.

2.  Optionally, encrypt your credentials.

    For instructions on encrypting your credentials to avoid storing passwords in plain text, see
    [Password Encryption](https://maven.apache.org/guides/mini/guide-encryption.html) in the Apache
    Maven documentation.

3.  Add your credentials in the `<servers>` section of your Maven `settings.xml` file.

    For detailed instructions on configuring the `settings.xml` file, see
    [Configure Maven to Access MuleSoft Enterprise Repository](https://docs.mulesoft.com/mule-runtime/latest/maven-reference#configure-maven-to-access-mulesoft-enterprise-repository).

## See Also

- [Export Troubleshooting Information](https://docs.mulesoft.com/anypoint-code-builder/troubleshooting#export-troubleshooting-info)
