Mule Studio
When you add a connector to your flow, Studio automatically adds all of its dependencies (including .jar
files) to your project’s classpath. Mule manages each connector’s dependencies as an Eclipse user library. Because Studio adds a connector’s dependencies to your project’s classpath, you can reference connector classes within other projects in your Mule Studio instance.
Manually Adding Connector Dependencies
Complete the following procedure to manually add connector dependencies to your project’s classpath in Studio.
-
In the Package Explorer pane, right-click on your project’s name, then select Build Path > Add Libraries.
-
In the Add Libraries wizard, select Mule Cloud Connector Dependencies, then click Next.
-
Check the boxes associated with the connector dependencies you wish to add to your project’s classpath.
-
Click Finish to add the dependencies.
Maven
If you are installing a connector as a Maven dependency, ensure that you complete the following three steps for each connector:
-
To make any connector module available to a Mavenized Mule application, first add the following repositories to your pom.xml
file:
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Repository</name>
<url>https://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshot Repository</name>
<url>https://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>
-
Then add the module as a dependency to your project, replacing insert-artifactId-here
with the artifactId of the specific module you are adding and replacing RELEASE with the version of this module.
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>insert-artifactId-here</artifactId>
<version>RELEASE</version>
</dependency>
-
If you plan to use this module inside a Mule application, you need to add it to the packaging process. As such, the final zip file which will contain your flows and Java code will also contain this module and its dependencies. Add a special inclusion to the configuration of the Mule-Maven plugin for this module, replacing insert-artifactId-here
with the artifactId of the specific module you are adding.
<plugin>
<groupId>org.mule.tools</groupId>
<artifactId>maven-mule-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<excludeMuleDependencies>false</excludeMuleDependencies>
<inclusions>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>insert-artifactId-here</artifactId>
</inclusion>
</inclusions>
</configuration>
</plugin>