IntelliJ 12 loses module dependency when adding maven dependency

This seems like a bug or I am doing something wrong with IntelliJ (which is possible, new to it and Java develoment (from .NET and C#)).

I have a multi-module project setup with maven handling dependencies.

I have a "super pom" and multiple child poms where the super pom has shared dependecies and the child has specific dependencies.

I have one module "web" that depends on another module "core". I have added a module dependency on web to core in the "compile" scope. I have added the compile output of the "core" module to the artifacts of the "web" module.

The problem is, is that everytime I adjust (change, add, remove etc) a maven dependecy, Intellij loses the module dependency in "web" on "core". Literally every single time, I have to re-add it and add it to the artifacts.

Is this a bug in IntelliJ or am I doing something wrong with the dependencies?

Thanks,
Joe

2 comments

Hello.

Normally if IDEA module is a Maven project, then dependencies are synchronized in one direction: changes in pom.xml are "replicated" in IDEA dependencies. So the question:

> I have added a module dependency on web to core in the "compile" scope.

Have you done that in pom.xml or in Project Structure dialog only? Please try to do that in pom.xml if acceptable and not yet done.

Thanks,
Alexander.

0

Ahh ok, I had not specificed the module depenency in the pom and I had only done it throught the dependencies dialog.
Did not realize that maven should be used for inter-project dependencies as well.

Thanks,
Joe

0

Please sign in to leave a comment.