Advice for developing interdependent Maven artifacts

I'm trying to move from Eclipse to IntelliJ, and I've been through the Eclipse migration document, but I'm still having trouble setting up my IDEA project and modules to get the major functionality out of them I'm accustomed to from Eclipse. I've about decided that I can never do it the "old" way again. But, I need some experienced IDEA users to suggest what the new normal will look like.

Here's an example of what I have to work with...

Artifact A (jar)
Artifact B (pom)
Artifact C (jar module, parent is B)
Artifact D (war module, parent is B)
Artifact E (war)

Artifact A, B, and E exist in separate SCM repositories. B contains C and D.

Artifacts C, D, and E depend on Artifact A.

In eclipse, I could check out A, B, and E into the same Eclipse workspace, Artifact B would get split up into three Eclipse projects: parent, module C, and module D. I could develop in "Workspace Resolution Mode" and changes to Artifact A would be visible in C, D, and E so long as the pom referenced the version of Artifact A in the workspace. (If not, the Eclipse project will use the deployed artifact referenced in its pom) ... This was very convenient in that if there was cross-artifact development to be done I didn't have to deploy a snapshot after each interation. The web and GWT debug deployment plugins would also respect this workspace resolution mode. "Workspace Resolution Mode" could be turned off and each project would operate in its own little dependency bubble.

In IntelliJ, I can't figure out checkout the artifacts as IDEA modules and have them properly reference each other. Is there a better way?

1 comment
Comment actions Permalink

You can import all pom.xml files as modules to a single IDEA project using File | 'Add Module' action. IDEA should arrange dependencies between
modules automatically.

Nikolay Chashnikov
Software Developer
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.