To Package a Mule Application (Mule Maven Plugin)

You can use the Mule Maven Plugin to package your application into a deployable JAR file that you can later deploy to a running Mule Runtime.

  1. Make sure you added the Mule Maven Plugin to your pom.xml file.

  2. From the command line in your project’s folder, run the package goal:

    > mvn clean package

The packager then packages your application and creates the deployable JAR file into the target directory within your project’s folder.

If you want to import your generated JAR into Anypoint Studio, you need to package your application using the -DattachMuleSources option.

> mvn clean package -DattachMuleSources

The -DattachMuleSources argument tells the packager to add a mule-src folder inside the META-INF directory with an exact copy of your application structure at design time.

In this topic: