html code

The parent POM and the main project POM are deployed to the Maven repository for sharing

In real-world projects, the reuse of dependencies across various projects and APIs is a common practice, and a parent POM proves invaluable in such scenarios.

It serves as a central hub for efficiently managing shared resources and provides a single point for making modifications that can be applied across all our projects. The parent POM is essentially a Maven project that can be referenced by a MuleSoft API’s pom.xml file to access additional information, such as properties.

For instance, consider the HTTP Connector version specified in a parent POM. By modifying the HTTP Connector version in the parent POM and rebuilding any project dependent on it with Maven, all associated projects can seamlessly update their internal HTTP Connectors without requiring any changes to the API itself.

Generate a fresh parent POM Mule project and include the specified details in the POM file:


Incorporate the necessary version details for properties that need to be accessed from the main project.


Include <type>custom</type> within the <Properties> section.

Integrate the specifics of the Mule Maven plugin.


Include our repository information in the distribution management section, ensuring the correct groupId and version are set to ‘v2’.

<name>Anypoint Platform Exchange Repository</name>

Please be aware that the Exchange username and password should be available within our local .m2 directory, specifically in the Maven’s ‘conf’ folder at ‘settings.xml’ location, as follows:


Execute the ‘mvn clean install deploy’ command from the directory of the parent POM on your local machine. This action deploys your Parent POM to the Exchange, although it won’t be directly visible in the Exchange platform. To confirm the successful deployment, execute the Maven command in your main project, ensuring you’ve made the necessary modifications to the main project’s POM file to reference the parent POM. Subsequently, you should observe the creation of the ‘client-parent-pom’ folder within the .m2/ directory, which serves as confirmation that the Parent POM has been successfully deployed. Be sure to make the required adjustments in the main project’s POM file.

Include the following information:


Substitute the current version with a temporary placeholder.


</dependency> tag

  • The key distinctions here are the presence of the ‘parent’ element and the use of a Maven property to define the version of the HTTP Connector. Notably, you’ll observe that the configuration for the HTTP connector, in the form of a Maven property, is absent in this pom.xml and is instead located within the parent POM.
  • This proves highly advantageous when dealing with multiple projects, as it allows for a single modification in the parent POM to update all versions to the latest one, without causing any changes to the POM files of other main projects.