Maven Dependency Sync

Compatible with  IntelliJ IDEA
20.04.2007
16 715

Keep your IntelliJ classpaths synchronised with a Maven POM File. You don't need to use Maven as your build tool, just leverage its handy dependency management!

Quick Instructions
  1. Create a POM file for your module(s) listing top level dependencies.
  2. Optional In the project settings under Maven Dependency Sync, configure a list of repositories. You can mix file and HTTP repositories. By default http://ibiblio.com/maven2 is chosen.
  3. Associate a POM file with an IntelliJ module in Project Structure -> module -> POM File.
  4. Then use Tools -> Fetch Dependencies to download all dependencies for modules with POM Files.
More Information Transitive dependencies are also fetched. This means you if you depend on hibernate, its dependencies (e.g. cglib, asm) will be fetched.

When a library is first fetched source and javadoc are automatically fetched. If they were not available from the remote repository you can install them in a local maven repository and then right click the library in the Project View -> Fetch Source and Javadoc.

A module can mix maven configured and manually configured libraries. The order of dependencies specified in the normal IntelliJ dependencies configuration will be preserved.

The local maven repository (a cache of downloaded artifacts) is located in $HOME/.m2/repository. The IntelliJ classpath will point at jar files in this directory. A future version of the plugin will be more flexible with this location.

You can use the same POM files to configure classpaths in your Ant build using the Maven dependency Ant tasks.

Download plugin

Version

Update date

Recent change notes

- Allows downloads to be cancelled. - Displays progress while downloading.

General usage instructions

Quick Instructions




  1. Create a POM file for your module(s) listing top level dependencies.


  2. Optional In the project settings under Maven Dependency Sync, configure a list of repositories. You can mix file and HTTP repositories. By default http://ibiblio.com/maven2 is chosen.

  3. Associate a POM file with an IntelliJ module in Project Structure -> module POM File.

  4. Then use Tools -> Fetch Dependencies to download all dependencies for modules with POM Files.


More Information


Transitive dependencies are also fetched. This means you if you depend on hibernate, its dependencies (e.g. cglib, asm) will be fetched.


When a library is first fetched source and javadoc are automatically fetched. If they were not available from the remote repository you can install them in a local maven repository and then right click the library in the Project View -> Fetch Source and Javadoc.


A module can mix maven configured and manually configured libraries. The order of dependencies specified in the normal IntelliJ dependencies configuration will be preserved.


The local maven repository (a cache of downloaded artifacts) is located in $HOME/.m2/repository. The IntelliJ classpath will point at jar files in this directory. A future version of the plugin will be more flexible with this location.


You can use the same POM files to configure classpaths in your Ant build using the Maven dependency Ant tasks.


21.02.2014
does not work with intellij 13 anymore NoSuchMethodError: com.intellij.openapi.fileChooser.FileChooserFactory.createFileChooser(Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;Lcom/intellij/openapi/project/Project;)Lcom/intellij/openapi/fileChooser/FileChooserDialog;: com.intellij.openapi.fileChooser.FileChooserFactory.createFileChooser(Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;Lcom/intellij/openapi/project/Project;)Lcom/intellij/openapi/fileChooser/FileChooserDialog; also if enter the path to pom.xml manually it is not saved and fetch dependencies does not work anymore :-(
Anonymous
27.01.2011
Thanks this is very helpful
Anonymous
22.09.2010
Hello,
I am using Maven 2.2.1 and this is Sept 2010. Is this plugin, last updated in April 2007 still needed with IntelliJ 9 ?
08.04.2009
This is the most important 3rd party plugin out there. I don't see how you can tell IntelliJ about your dependencies using a pom file without this plugin.
Please  sign in  to leave a comment.