Maven dependencies in ESB Cutom Mediator (Carbon Studio 1.0.13)

jcortes.sogetthis.com's picture
Hi, i'm trying to create a Custom Mediator like [1]. My problem is i can't add maven dependencies to use in my Cutom mediator. I thunk that ESB Custom Mediators dependencies had to be inside a pom.xml of builder folder, but when i aggregate it the project it not imports the dependency. How can i add maven dependencies for ESB Custom mediators in Carbon Studio 1.0.13 and WSO2 ESB 4.0.0? [1] http://wso2.org/project/carbon-studio/1.0.13/docs/server_extensions_category.html#CustomMediator Regards, JC
harshana.wso2.com's picture

ESB Cutom Mediator

Hi, If your ESB Custom mediator refers a thrid party library, you need to add a dependency entry to the CAPP_PROJECT_LOCATION/builder/pom.xml. Then you will be able to build your C-App without issues. Since your C-App depends on this third party jar, you need to add it to the Classpath so that your custom mediator can access the classes. In order to do that, the practice we are following is placing your third party jars in to ESB_HOME/repository/components/lib location before you deploy your C-App which contains the custom mediator. We do not create jars with embedded dependencies. If your mediator does not get picked up, please try to restarting the carbon server. Hope this helps! Thanks and Regards, Harshana