Using <exclude> appears to be ignored by IDEA.
If I have project A which has a dependency D, and B depends on A with an explicit exclusion of D, then IDEA still includes D as a dependency for B. In my case this causes a class clash in unit tests.
<dependency>
<artifactId>A</artifact>
<excludes>
<exclude>D</exclude>
</excludes>
</dependency>
Unfortunately I'm not sure if IDEA itself supports the runtime non-export of dependencies to other modules. (the 'export' option seems to only apply to build-time)
Regarding the runtime exclusion - how do you reckon that should work? All the classes would be loaded into memory notwithstanding the dependencies of the module B. I'm not sure if I understood you clearly.