Add class from maven module


I want to use some class from module A in module B in a maven project. Module B has yet no dependency on module A. After typing classname and pressing Alt-Enter on it Idea offers

1. Add dependency on module A
N. Add Maven Dependency...

when selecting 1 - the dependency is added to project config in Idea but pom is not altered and thus doesn't compile from command line and dependency is lost after reimport.
when selecting N - it just can't find any dependencies.

Is it a bug or intended behaviour?

Best regards, Eugene.


Please sign in to leave a comment.