Cassandra XML and Maven Support - Mule 4

If you manually code a Mule application in XML either from the Studio XML editor or standalone, to get access to a connector, you must:

  • Add the namespace for the connector to your XML flow.

  • Add dependency information to your Maven pom.xml file.

In the Studio visual editor, when you drag a connector from the palette to the canvas, Studio automatically populates the XML code with the connector namespace and schema location.

Add a Namespace for the Connector

If you manually code the Mule application in Studio’s XML editor or another text editor, paste the following into the header of your configuration XML, inside the <mule> tag:

Configure the Maven POM File

The pom.xml is a Maven file that Anypoint Studio generates that contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your pom.xml file to enable access to this connector.

When creating an app manually from the XML, set up the pom.xml for your project:

        <name>MuleEE Releases Repository</name>
        <name>MuleEE Snapshots Repository</name>

This snippet shows a project dependency for a specific version:


Replace the contents of the <version> tag with the version that corresponds to the connector you are using.

To obtain the most up-to-date pom.xml file information, access the connector in Anypoint Exchange and click Dependency Snippets.


Now that you have completed XML and Maven, you can try out the Examples.