---
schema_version: "1"
id: 3bafbb655bfbb428ce55822b9a624bb1bef58784493841b2584d77fbc8f4f006
title: Build Environment
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/accelerators-home/build-environment.md
canonical_url: https://docs.mulesoft.com/accelerators-home/build-environment
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 105a976859fe6d206b7d9cb73ec44e2a807959c8cbaa8c2b5722179158f8e0bd
description: MuleSoft Documentation Site
latest: true
---
---
product: Accelerators
---

# Build Environment

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

All Mule applications run under the Java Runtime Environment (JRE). Application components are built
and deployed using Maven, a popular software management tool used in DevOps environments. MuleSoft
also provides an Eclipse-based Integrated Development Environment (IDE) called Anypoint Studio,
which is used for developing Mule applications in a graphical environment. While Studio can also be
used for building, testing, and deploying applications, the instructions provided in the Accelerator
documentation assume the use of Maven from the command line, except where noted.

## Software Requirements

The MuleSoft Accelerators for Salesforce Clouds are built on Mule 4 and Studio 7. Assets may work
with other versions of Mule and Studio, but no assurances can be given. The following is a list of
the minimum software requirements for working with Accelerator assets:

- Anypoint Studio 7.12.0 or higher

- Mule Runtime 4.4.0 or higher (included with Studio)

- Latest AdoptOpenJDK 8 release (included with Studio)

- Latest Maven 3.8.x release (for command-line deployments)

- Postman 9.x or higher (for API testing)

> [!NOTE] If you use Anypoint Studio 7.16 and later, you must override the Maven settings to use
> Maven version 3.8.x. To override the settings:
>
> 1.  Open Maven settings in Anypoint Studio > Settings > Anypoint Studio.
>
> 2.  Uncheck **Use embedded Maven installation**.
>
> 3.  Enter the local Maven 3.8.x installation path in **Maven installation home directory**.
>
> 4.  Click **Apply and Close**.

## Workstation Setup

Perform the following steps to prepare your workstation for building, deploying, and testing
Accelerator assets. These instructions assume some basic knowledge of using Maven and Eclipse-based
products.

### Installing

1.  Download and install the latest 64-bit version of the OpenJDK 8 release from
    [https://adoptium.net/](https://adoptium.net/). On Windows, add or update the `JAVA_HOME`
    environment variable to point to the installation root directory, for example
    `C:\Program Files\Java\jdk1.8.0_265`, and append `%JAVA_HOME%\bin` to the `PATH` variable.

2.  Download and install the latest Apache Maven 3.8.x release from
    [https://maven.apache.org/download.cgi](https://maven.apache.org/download.cgi). Add or update
    the `MAVEN_HOME` environment variable to point to the installation root directory, for example
    `C:\Utilities\apache-maven-3.8.4`, and append `%MAVEN_HOME%\bin` (`$MAVEN_HOME/bin` on
    Linux/MacOS) to the `PATH` variable.

3.  Download and install the latest 64-bit version of the Anypoint Studio 7 release from
    [https://www.mulesoft.com/lp/dl/anypoint-mule-studio](https://www.mulesoft.com/lp/dl/anypoint-mule-studio).
    Do not install the product under a folder containing spaces in the name.

4.  Launch Studio and create a new workspace for the accelerator assets. Do not locate the workspace
    under a folder containing spaces in the name.

### Configuring the Accelerator Build

1.  Download the
    [Accelerator Common Resources](https://anypoint.mulesoft.com/exchange/org.mule.examples/accelerator-common-resources-src)
    asset from Exchange and unpack the archive to a temporary directory. The directory should
    contain a single Studio project folder called `accelerator-common-resources`.

2.  Import the project folder into Studio using the **accel/Existing Projects into Workspace**
    wizard (not the Anypoint Studio project wizard). If the project does not import as
    `accelerator-common-resources`, you can select the project in the Package Explorer view and
    press F2 to rename it:

    ![Anypoint Studio Import Projects dialog showing the accelerator-common-resources project](/mulesoft/current/en-us/accelerators-home/_images/sfc-doc-setupguide_01.png)

3.  Copy the contents of the `settings-accelerators.xml` file to your local Maven `settings.xml`
    file, which is usually located under `$HOME/.m2` on Linux/MacOS hosts and `%USERPROFILE%\.m2` on
    Windows hosts; create a new file if it does not exist. If the file already exists, make sure to
    merge the contents of the `settings-accelerators.xml` with the existing. You may also choose to
    keep the file separate and specify the `-s <filename>` option when running Maven commands; in
    Studio you will also need to override the user settings path, which is under
    `Anypoint Studio/Maven/User Settings` in the Preferences dialog.

    > [!NOTE] This step is optional, if the project is intended to build only in Anypoint Studio.

4.  For now, update the `server` entries to specify your own usernames and passwords for the two
    Exchange repositories: `anypoint-exchange-v2` and `accelerator-exchange`. If you want to run
    MUnit tests from the command line, you will also need to provide separate credentials for the
    MuleSoft Nexus EE repository \`mule-enterprise).

## Testing the Configuration

> [!NOTE] Having proper values in the Maven settings file is critical for being able to resolve,
> build and deploy components using Maven.

To verify your workstation setup, import any Accelerator implementation template asset into Studio.
You can either manually download the asset from Exchange and import it using the
`Packaged mule application (jar)` wizard or you can launch the Exchange viewer in Studio to browse
and open one directly.

Once the project has been imported, verify that the project name in Studio matches the `name`
element in the `pom.xml` file. If it does not, which is usually the case when importing from a
downloaded archive, press F2 to rename it accordingly. This will make it easier to use the build
scripts later. Ignore any warnings or errors for now.

Open your favorite shell and navigate to the project root folder, for example
`C:\workspaces\accelerators\accelerator-jira-sys-api`). Run the command `mvn clean`. If the message
`BUILD SUCCESS` appears, then the command has completed successfully. If any errors are reported,
they must be resolved before continuing; consult the Troubleshooting section below for help with
common issues.

In Studio, close the project, wait until Studio has finished processing any tasks, and then open it
again. Ensure the project builds with no errors.

## Troubleshooting

If the `mvn clean` command does not complete successfully, or if Studio reports errors for the
imported project, something in your setup is missing or incorrect. The following table provides
common issues that may be encountered and steps for resolving the issues:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Issue</th><th>Possible Cause</th><th>Resolution</th></tr></thead><tbody><tr><td><p>Maven cannot find one or more dependencies</p></td><td><p>Credentials provided for the <code>server</code> entries may be invalid. If they are correct, it is possible Maven cached an earlier attempt to download the dependencies.</p></td><td><p>First, verify your credentials, and then add then run <code>mvn clean -U</code> to force Maven to update all dependencies. You can also force an update by removing cached dependencies from the <code>.m2/repository</code> folder. If this does not resolve the issue, download the POM Parent and Common Core assets and install them locally as per the <a href="https://docs.mulesoft.com/accelerators-home/additional-customizations">Additional customizations</a> page.</p></td></tr><tr><td><p>Studio reports "null" version errors</p></td><td><p>Studio is not resolving the parent POM correctly.</p></td><td><p>If the <code>mvn clean</code> command succeeded, close the project and then reopen it. If that does not work, try restarting Studio. As a last resort, delete the project, but not the files, from Studio and then import it again.</p></td></tr><tr><td><p>Error reported during project rename</p></td><td><p>Studio has locked one or more files.</p></td><td><p>Verify the new project folder contains the same files as the old one. Close Studio, delete the old project folder, and then launch Studio again.</p></td></tr><tr><td><p>Studio reports "cannot import as Mule project" error</p></td><td><p>The wrong wizard was used to import the project.</p></td><td><p>If the project still appears in the Package Explorer view, you can ignore the error. If it does not still appear, try the import again with a different import wizard.</p></td></tr><tr><td><p>Cannot update connector versions using Studio</p></td><td><p>Accelerator assets use dependency management defined in the parent Maven config.</p></td><td><p>To update the version of a dependency, either add a <code>&lt;version&gt;</code> tag directly to the application’s <code>pom.xml</code> file or update the version in the parent and redeploy it. Be sure to update the version of the parent POM and reference the new version in the application.</p></td></tr></tbody></table>

## See Also

- [Getting Started](https://docs.mulesoft.com/accelerators-home/getting-started)

- [Application Deployment](https://docs.mulesoft.com/accelerators-home/application-deployment)

- [Additional Customizations](https://docs.mulesoft.com/accelerators-home/additional-customizations)

- [Application Testing](https://docs.mulesoft.com/accelerators-home/application-testing)

- [MuleSoft Accelerators](https://docs.mulesoft.com/accelerators-home/)
