Getting Started with the Mule SDK
This section can help you start developing Mule SDK projects.
The SDK provides a Maven Plugin and a Maven Archetype to create new projects. An archetype is defined as an original pattern or model from which all other things of the same kind are made.
There is a Maven plugin with steps and descriptions of the fields that are required to create a new Extension Project. You can run this command to get prompted for these values:
The generated project contains the basic Mule module structure with some basic classes, a dummy implementation, and two running tests that use the generated module.
Because this project is a Maven project, it contains a
pom.xml file that contains all the information and configuration details used by Maven to perform the build. This generated POM file inherits from the module’s parent POM, which contains all the common configurations and defaults for all Mule module projects.
1 2 3 4 5 <parent> <groupId>org.mule.extensions</groupId> <artifactId>mule-modules-parent</artifactId> <version>1.1.0</version> </parent>
You must have the following components installed and working in your local environment:
Java Development Kit 8 (JDK 8) to compile and build your Java code.
Apache Maven, version 3.3.9 or higher, to manage your project’s build.
For the SDK to work, you must pass the command line parameter
-parameters to the Java compiler.
If you use Anypoint Studio or Eclipse:
Right-click the project.
Java Compiler, and enable
Store information about method parameters (usable via reflection).
Once your project is generated, you can build it by running the following command:
mvn clean install
You run this command to compile your project, run the tests, and install the project in your local Maven repository.
Now you are ready to add your custom module code.
You need to find the
@Extension annotated class and then examine module structure and the different elements that you can add to a module.
|Different features are available in different vesions of the SDK. See Choosing the SDK version to pick the right version for your connector.|