I've tried to search for a solution for this, but have had no joy: In Intellij IDEA 11 I've set up a set of modules so that I have the following:
- My Web Project (all module dependencies set to 'Runtime')
- My Web Project Dependency #1 (+ artifact that copies JAR to MWP's /WEB-INF/lib)
- My Web Project Dependency #2 (+ artifact that copies JAR to MWP's /WEB-INF/lib)
Dependency#1 has a class org.acme.foo, but so does MWP and the definition differs (oh joy). It builds ok - all code in MWP correctly builds against the classes in MWP instead of Dependency#1.
But...in its editor, Intellij is giving me the red squiggle because it's preferring to reference the class in Dependency#1 with its incompatible definition.
Ignoring the fact that there really shouldn't be this class/package clash, can anyone help me push Intellij into looking at the class in the local module, and not at the class in the dependency?