IntelliJ IDEA Plugin development, how can I get the MavenProjectsManager instance?

StackOverflow https://stackoverflow.com/questions/18804953

  •  28-06-2022
  •  | 
  •  

Question

How can I get the MavenProjectsManager instance?

  1. Is there a service, component or something else that goes in the plugin.xml to instantiate the MavenProjectsManager instance?

    MavenProjectsManager manager = MavenProjectsManager.getInstance(project);

My plugin.xml file so far:

<idea-plugin version="2">
    <id>com.arcbees.plugin.idea</id>
    <name>GWT-Platform (GWTP) IntelliJ IDEA Plugin</name>
    <version>1.0.0</version>
    <vendor email="support@arcbees.com" url="http://www.arcbees.com">ArcBees</vendor>

    <description><![CDATA[
      The GWTP IDEA plugin provides tools for GWT-Platform framework in IntelliJ IDEA.<br>
      ]]></description>

    <change-notes><![CDATA[
      Project Creation by Archetype added (8/30/2013).<br>
      ]]>
    </change-notes>

    <!-- please see http://confluence.jetbrains.net/display/IDEADEV/Build+Number+Ranges for description -->
    <idea-version since-build="107.105"/>

    <depends>org.jetbrains.idea.maven</depends>

    <application-components>
    </application-components>

    <project-components>
    </project-components>

    <actions>
    </actions>

    <extensions defaultExtensionNs="com.intellij">

        <moduleType id="GWTP_CREATE_PROJECT_MODULE"
                    implementationClass="com.arcbees.plugin.idea.moduletypes.CreateProjectModuleType"
                    classpathProvider="true"/>

        <wizardMode implementation="com.arcbees.plugin.idea.wizards.createproject.CreateProjectWizard"/>

    </extensions>

</idea-plugin>
Was it helpful?

Solution

  1. Download the community version
  2. If on a mac, Show package contents of the Community Version
  3. Open the package, seek out the plugins directory with the maven plugin jar.
  4. Add that jar to a location where you can remember it in the file system.
  5. Goto the plugin, open module settings.
  6. Goto the SDK's and find the IntelliJ IDEA SDK and add the maven jar to the SDK jar list.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top