Contact Us 1-800-596-4880

Maven Support in Anypoint Studio

The following sections describe how to enable or disable Maven support for your projects in Anypoint Studio.

Setting Your Maven Preferences

You can adjust your Studio preferences so that Studio automatically generates a pom.xml file upon project creation.

  1. Navigate to Anypoint Studio > Preferences (or Windows > Preferences in Windows).

  2. In the Preferences panel, click to expand Anypoint Studio, then select Maven.

  3. Click Enable automatic maintenance of pom.xml.

    Mavensupport
  4. Click Browse to locate the Maven installation home directory.

  5. Click Test Maven Configuration to instruct Studio to run mvn --version in 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.

    TestMaven

    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.

  6. When finished, click OK to save your changes.

Disabling Maven Support in a Single Studio Project

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.

maven 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 pom.xml file, you cannot re-enable it via the Maven Support in Studio menu item. To re-initiate Maven support, consult the Enabling Maven Support for a Studio Project documentation.

See Also