Niel de Wet
Niel de Wet

Reputation: 8398

Adding maven support to existing IntelliJ module is not available

I just started an IntelliJ plugin project, and after going a few steps, I realized that I am not managing dependencies with maven. Naturally I head over to the module in the project explorer, and right click -> Add Framework Support. But Maven is not listed! In fact, the only thing listed is Groovy. What could cause this, and how do I get maven back?

The maven plugin is enabled.

Upvotes: 36

Views: 35581

Answers (6)

Prabhat Yadav
Prabhat Yadav

Reputation: 1331

To get the option in the right hand of intellij you have to follow two step given below -

  1. Right click on Pom.xml
  2. Click on "add as Maven Project"

Upvotes: 2

Ashwani Sharma
Ashwani Sharma

Reputation: 499

The above options might take some time to execute but there is a quick fix to this if you already have a pom.xml file present in the project. Right click on the pom.xml file and you will see an option

Add as Maven Project

enter image description here

Upvotes: 13

alexis_dia
alexis_dia

Reputation: 156

As far as I understood, you have to mark your folder with pom.xml as Maven module.

In order for the project to become Maven:

  1. Go to - File -> Project Structure (or Ctrl + Shift + Alt + S)-> Modules. In the middle, you must remove the existing module.
  2. Then in the same place of window click on the plus -> Import module -> Select the required folder with pom.xml -> Import module from external module -> Maven -> Next -> Finish
  3. You may need to restart your IntelijIdea. Better just in case to restart it.
  4. After restarting it, it should be appear a pop-up window in the lower right corner - Import maven module -> Click on it. After that, the folder for module and pom.xml should be displayed as Maven.

P. S. Also check before these steps, that you have Maven support for your IntelijIdea.

Upvotes: 5

Pipo
Pipo

Reputation: 5083

Solved it being root as intelliJ launcher... not the best solution but seems a workaround. So the best solution I found yet instead of digging into filesystem to see where there is a permissions problem was to change the owner to my user

sudo chown -R myUsername:myUsergroup /opt/becauseIInstalledItHere/idea-IC-version

Upvotes: 0

Arpit Agarwal
Arpit Agarwal

Reputation: 573

First, make sure you have enabled maven plugin in

File -> Settings -> Plugins and add search the maven plugin and activate

Restart the IntelliJ.

Go and check the tool window to make it visible

go to View -> Tool Windows > Maven Projects to open it.

Upvotes: 6

Niel de Wet
Niel de Wet

Reputation: 8398

Here is a brief answer how to get going with Gradle, but most questions remain unanswered.

How to manage development life cycle of IntelliJ plugins with Maven

For a comprehensive read this post : http://labs.bsb.com/2013/11/how-to-manage-development-life-cycle-of-intellij-plugins-with-maven-2/

The post also includes a link to the source code on github.

Making your plugin project use maven in IntelliJ

This is probably not what you are struggling with, but I include it just in case. Supposing you have already started a new plugin project you have two options:

  1. Right-click on the project name in the project explorer and choose New > Module
  2. Create a pom.xml in the project root, then right-click on it and choose Add as Maven Project

hth

Upvotes: 10

Related Questions