In my maven based IntelliJ project I have 2 modules - modules A and B.
When I import the maven modules IntelliJ adds the module's A source code in the dependencies of module B (ignoring the "withdeps" classifier).
Is it possible to force Intellij to add the module A dependency to B as "maven library" instead of the default "project source code/Intellij module"? If not what can I do to resolve the compilation errors in IntelliJ (Ctrl+F9)
Thanks
Open the pom.xml of module B only when creating the intellij project. Then all dependencies will be as maven dependencies.
The downside is that this way you will have to open module A as separate project in another window, then when you change something you will have to do mvn install and refresh project B.
Much better solution would be to install all depencencies into maven repository, described here in maven docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With