IntelliJ IDEA Plugin development with Maven?

I'd like to use Maven to manage the dependencies of my plugin module.  Is that possible since it seems Maven and Plugin modules are mutually exclusive.  I'd rather not have to check in the dependency jar files into my Git repository.

10 comments
Comment actions Permalink

Hello Brian,

You can use a plugin module for running and debugging the plugin from the
IDE (where the dependency jars are linked as part of the IntelliJ IDEA SDK
anyway), and use a Maven pom.xml to build the plugin distribution from the
command line.

Note that we aren't currently publishing IntelliJ IDEA jars to any public
Maven repository.

I'd like to use Maven to manage the dependencies of my plugin module.
Is that possible since it seems Maven and Plugin modules are mutually
exclusive.  I'd rather not have to check in the dependency jar files
into my Git repository.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

I'm not looking to manage the IDEA SDK jars with Maven, just additional dependencies.  If I have a Maven pom.xml within the Plugin module, will IDEA recognize it and manage these additional dependencies as Maven dependencies of the Plugin module?  Put another way, how can I open "Project Structure" and add a "Maven dependency" to my IDEA Plugin module so that IDEA recognizes it as a Maven dependency?

0
Comment actions Permalink

Brian,

Unfortunatelly it is not possible to use Maven Integration with Plugin Module - only Java Module type is supported.
Please open a youtrack request.

Thanks,
Anton Makeev

0
Comment actions Permalink

Thanks Anton, I've opened this feature request: http://youtrack.jetbrains.net/issue/IDEA-65130

0
Comment actions Permalink

Hi, Brian.

I think you should try use gradle (http://gradle.org) for managing dependencies of your plugin module. IDEA supports gradle very transparently and you do not have to create special type of IDEA projects. Just you add build.gradle file to root of your project and you define there a maven-central repository, IDEA will be immediately able to add the library from it in classpath. It is solution for me in case of plugin development


0
Comment actions Permalink

Another option if you're only looking to manage dependencies might be to use Ivy - AFAIK you should be able to use Ivy in a plugin module and it should be easy to use if you're familiar with Maven.

0
Comment actions Permalink

Hello,

I'm not familiar with gradle or the gradle Idea plugin at all, but if it's as easy as you say it is, I'd like to try it for my Idea plugin.  In the gradle.build file, is all I need the respositories declaration?  Like:

repositories {     maven {         url "http://path/to/my/company/repo"     } }


How do I actually build with this then?  Do I use Idea make, or do I use the gradle build?

Thanks,

Eric
0
Comment actions Permalink

Hi,

If anyone is interested, here's how we integrate Maven and IntelliJ plugin development at my company :

http://labs.bsb.com/2013/11/how-to-manage-development-life-cycle-of-intellij-plugins-with-maven-2/

Regards,

Gauthier

0
Comment actions Permalink

@Gauthier, The link that you posted is not working anymore, I am also looking for a way to develop an intellij plugin using maven  - mainly for management of dependencies but also for consistency with other projects in our company. 

0
Comment actions Permalink

Hi, unfortunately I'm no longer working for that company and it seems they put the technical blog down (and I do not have a copy of the original text).

Anyway here's an example of what was explained in the blog : https://github.com/bsblabs/intellij-xmlbeans-plugin

The main idea is to have IntelliJ as a maven dependency of scope system.

Sorry that I can't help you more, regards,

 

Gauthier

1

Please sign in to leave a comment.