Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Using the Module Archetype

Mule DevKit provides a Maven Archetype to simplify the creation of Mule extensions. Running the archetype sets up a new Maven project with all the necessary dependencies to create a custom Module. It also creates a proper directory structure and class skeletons to help you start coding quickly.

To use Mule DevKit’s Maven Archetype, ensure that you are using Maven 3.x.

The archetype’s group id, artifact id and version are listed in the table below.

Parameter Value

archetypeGroupId

org.mule.tools.devkit

archetypeArtifactId

mule-devkit-archetype-generic

archetypeVersion

3.2

For the archetype to set up the new project correctly, you must set the properties listed in the table below.

Parameter Description

groupId

group id of the new project

artifactId

artifact id of the new project

version

version of the new project

muleVersion

Mule version for which this Connector has been developed

muleModuleName

name of the Module in camel case, first letter capitalized

muleModulePackage

base package of the project (for example: com.mycompany)

Example

The command that follows is an example that creates a custom Module project.

  mvn archetype:generate -DarchetypeGroupId=org.mule.tools.devkit \ -DarchetypeArtifactId=mule-devkit-archetype-generic -DarchetypeVersion=3.2 \-DarchetypeRepository=http://repository.mulesoft.org/releases/ \ -DgroupId=com.mycompany -DartifactId=cool-module -Dversion=1.0-SNAPSHOT \-DmuleVersion=3.2.1 -DmuleModuleName=CoolExtension \-Dpackage=com.mycompany.coolextension \-DarchetypeRepository=http://repository.mulesoft.org/releases

In this topic: