How to add external maven repository as dependency to my plugin?
Answered
I've read:
- http://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206773985-Using-the-maven-plugin-as-dependency
But still I'm not sure how to add properly external dependency to plugin.
I want to add this: https://github.com/bbaumgartner/jtoggl
I can copy jar directly or use maven repository. I'm asking about best practices.
Thanks
Please sign in to leave a comment.
IntelliJ platform currently doesn't support external dependencies at runtime. All libraries used by your plugin should be either bundled into 'lib' directory of your plugin distribution, or come from other plugins your depend on or the IntelliJ core itself.
'depends' tag in plugin.xml file may refer only to other plugins or the platform modules.
Have you tried adding it through Libraries Menu ?
Enakin,
this is indeed allows you to download and use a library from Maven repository, but you'll still need to pack it with your plugin to make it available at runtime.