Automatic Pickup of Third-party Transports and Modules

motif

In a previous blog post about the Mule IDE, I described its configuration wizard, which makes it very easy to create a Mule configuration file by selecting the modules and transports you want to include. Today I’d like talk more about what’s going on under the hood and explain how the Mule IDE discovers modules and transports from the Mule distribution directory.

When you start Eclipse, the Mule IDE scans the lib/boot, lib/mule, lib/opt, and lib/user directories of the Mule distribution for JAR files. It then includes all JAR files with the prefix mule- in the list of available modules/transports in the Mule IDE. When you make a selection from the list, the Mule IDE reads the spring.schemas file from that JAR to determine which namespaces to include for that module or transport.

The advantage of this approach is that it works with any JAR file that includes a Spring-based schema file and uses the Mule naming convention. For example, you can drop third-party modules and transports from the MuleForge into $MULE_HOME/lib/user. When you restart Eclipse (or switch Mule distributions) and run the configuration wizard in the Mule IDE, you will see them included in the list.

The screenshot shows the latest LDAP transport from the MuleForge that was dropped into a Mule distribution. When you select the LDAP transport, the generated XML configuration file contains the proper namespace declarations for it:


< ?xml version="1.0" encoding="UTF-8"?>

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ldapsasl="http://www.mulesource.org/schema/mule/ldapsasl/2.2"
xmlns:<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldaps</a>="http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldaps</a>/2.2"
xmlns:<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldap</a>="http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldap</a>/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/ldapsasl/2.2
http://www.mulesource.org/schema/mule/ldapsasl/2.2/mule-ldapsasl.xsd
http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldaps</a>/2.2
http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldaps</a>/2.2/mule-<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldaps</a>.xsd
http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldap</a>/2.2
http://www.mulesource.org/schema/mule/<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldap</a>/2.2/mule-<a href="http://www.mulesoft.com/cloud-connectors/ldap-integration-connector" target="_blank" rel="" title="LDAP Integration Connector" >ldap</a>.xsd
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd"&gt;


We'd love to hear your opinion on this post