Reputation: 227
How to install Kafka connector manually in Mule Any Point Studio 7X ? We don't have internet access from Remote server, So everything needs to installed manually. I can download kafka connector from Mule Soft site but not sure how to install connector as.jar file.
Appreciate your help!
Upvotes: 0
Views: 449
Reputation: 25664
In Anypoint Studio 7.x/Mule 4.x connectors are not installed into Studio as in previous versions. They are Maven dependencies, because all Mule 4.x projects are Maven based. So the problem is to install the Maven dependency for the Mule 4 Kafka connector into your local Maven directory. This is done automatically by Maven when building a project assuming there is internet access. In your case there is no internet access, that is the way Maven expects to work. You can try one of the following alternatives, but neither is perfect for every scenario:
mvn install:install-file -Dfile=<path-to-file>
. Note that connectors are like other Maven dependencies and have their own dependencies. You will have to be
sure to add those dependencies too for the build to work. You will
need to repeat this process every time there is a new release that
you want to use. The command to install a dependency from a jar built from Maven works in recent versions of Maven. If using an older version -not recommended- you will have to use a less convenient alternative: https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html~/.m2/repository
, Windows:
%USERPROFILE%\.m2
to your restricted computer. Note that copying
the entire repository might override dependencies that were installed
manually. You might want to cherry pick the dependencies of the
connector and copy those directories only. You will need to repeat
this process every time there is a new release that you want to use.The connector will not be visible in Studio palette until you add it to the project, by adding its dependency to the pom.xml file of the project as documented at https://docs.mulesoft.com/kafka-connector/4.4/kafka-connector-xml-maven#add-a-pom-file-dependency
Upvotes: 2