Maven Support in Anypoint Studio
The following sections describe how to enable or disable Maven support for your projects in Anypoint Studio.
You can adjust your Studio preferences so that Studio automatically generates a
pom.xml file upon project creation.
Navigate to Anypoint Studio > Preferences (or Windows > Preferences in Windows).
In the Preferences panel, click to expand Anypoint Studio, then select Maven.
Click Enable automatic maintenance of pom.xml.
Click Browse to locate the Maven installation home directory.
Click Test Maven Configuration to instruct Studio to run
mvn --versionin the background to validate your Maven installation. Studio produces an output of that command in a box below the button. The results flag any problems with your settings, such as a missing JAVA_HOME environment variable.
OS X Mavericks
If you are running OS X Mavericks, Studio cannot automatically find your Maven installation, so your home directory field is blank and the Maven support boxes unchecked.
To use Maven with Anypoint Studio on Mavericks, configure your Maven home directory manually by clicking Maven installation home directory > Browse. After you locate a valid Maven home, click Test Maven Configuration to verify your settings.
When finished, click OK to save your changes.
If you have created Maven project in Studio and wish to disable Maven support for that particular project, right-click the project name in the Package Explorer, then select Mule > Disable Support.
The Disable Support option does not remove the
pom.xml file, Studio ceases to maintain it for the project.
You can re-enable Maven support via the Studio menu item if you did not delete the
pom.xml file. Right-click the project name in the Package Explorer, then select Mule > Enable Support.
If you disable Maven support in your Studio project and delete the
Follow along with Building a Mule Application with Maven in Studio which demonstrates the end-to-end experience of using Maven and Studio to create, manage, and deploy a Mule project.
Using Maven outside of Studio? Refer to these instructions for configuring your Maven installation to point to the necessary repositories.