Setting Up a DevKit Development Environment
This document explains how to prepare a development environment that includes all the components required to develop Anypoint Connectors. You must have the following components installed and working in your local environment:
The sections below describe the specific details necessary for setting up your connector development environment.
This document assumes that you are familiar with a Java IDE (Eclipse or IntelliJ) and have some familiarity with the Maven build manager for Java. Further, it assumes that you know how to install an instance of JDK 7 on your platform (Windows, Mac, or Linux).
To build Anypoint Connectors for Mule, you need a Java IDE with http://maven.apache.org/[Maven] support. Although you can use any Java IDE with Maven support, the following are commonly in use by developers:
|While IntelliJ IDEA and m2eclipse provide integration between the IDE and Maven, each depends on the presence of a standalone Maven instance in your environment.|
Alternatively, you can install one of the following to use in place of an IDE:
A standalone Eclipse installation is an easily configured foundation for a development environment for Anypoint Connectors. Install http://www.eclipse.org/downloads/packages/release/juno/sr2[Eclipse 3.8 (Juno)], then add the http://eclipse.org/m2e/[m2e Maven] tooling for Eclipse to plug Eclipse into your connector team’s daily development cycle.
IntelliJ IDEA is another common, popular IDE for Java, for which a free http://www.jetbrains.com/idea/free_java_ide.html[community edition] is also available. The biggest advantage of IntelliJ IDEA for connector development is that Maven support is built into IntelliJ IDEA, which eliminates a source of configuration effort in setting up your environment.
Oracle makes JDK 7 freely available for all supported platforms, including Windows, Mac OS X and Linux. Download the latest http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java Development Kit 7 (JDK)] for your platform and install.
When building a connector, you use the Maven build manager to generate a new connector project, and for ongoing build activities during the connector development process. If you are not familiar with Maven, http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html[Maven in Five Minutes] provides a brief introduction to the concepts and basic commands.
Download the Maven distribution from the http://maven.apache.org/download.cgi[Maven download page].
Unpack the download to a folder on your local drive.
Create an environment variable called
M2_HOME, then set it to the folder into which you unpacked Maven.
PATHenvironment variable to include the path to Maven binaries.
Windows: add the following line to the PATH variable:
Mac or Linux: add the following line to the PATH variable:
For more detailed instructions and installation options, see the Maven download page; instructions for different platforms are available below the download links.
m2e plugin for Eclipse enables Eclipse to import Maven projects and update the meta-information for them.
m2e also includes the dependency management capabilities of Maven, so any necessary libraries are downloaded and configured correctly in Eclipse when you import or update a project.
Follow the procedure below to install m2e as a plugin in Eclipse 4.3 or later.
In Eclipse, under the Help menu, select Install New Software.
In the Work with field of the Install panel, use the drop-down to select the following URL:
m2eclipse Update Site - http://download.eclipse.org/technology/m2e/releases
If the m2eclipse update site does not appear as an option in the drop-down menu, you can click Add, then manually enter the URL.
Further, if using an earlier version of Eclipse, you may need to download a corresponding previous version of m2e. In Eclipse, go the the Eclipse Marketplace (Help > Eclipse Marketplace…) to find the version of m2e you need to install.
In the table, select Maven Integration for Eclipse, then click Next.
In the Install Details window, click Next to continue installation.
In the Review Licenses window, accept the terms of the license agreement, then click Finish.
After Eclipse completes installation of the
m2eplugin, click Restart Now to complete the installation and restart Eclipse.
As a DevKit developer, you need http://www.mulesoft.org/download-mule-esb-community-edition[Mule Studio] to test your connector. If you have not already installed Mule Studio, follow the detailed instructions to install. For a quick introduction to Mule Studio, review Mule Studio Essentials.
You can also use Mule Studio, with m2eclipse installed, as your DevKit IDE (running a second instance, alongside your test environment) to build your connectors.