Test runs, module classpaths, and conflicting JAR file versions

Hi,

I'm working on a large project (100+ people) where we organized our code in a number of self-hosted modules, meaning they all contain whatever is required to build them w/o a greater project context. As a consequence, they all contain their own copies of JAR files which are configured in the corresponding module classpath setting. So far so good.

However, when running unit tests within IDEA, the internal mechanism does not seem to pay attention to module classpath settings, but simply concatenate all JAR files to one long classpath passed to JUnit testrunner. This results in problems as soon as two modules host different versions of the same JAR file.

Due to the sheer number of modules it does not make sense for us to put those JARs in the context of project libraries. We're working with several IDEA project files to reduce visibility for certain work areas. Maintenance of JAR dependencies would become a big headache.

So is there a recommened way around this problem or would IDEA have to change its current behavior and run unit tests on a per module basis considering module classpaths?

Thanks.

Please sign in to leave a comment.