Complex multi-module projects need the ability to customise the classpath for Facet-related functionality that runs within the IDE.
I'm one of those weird people who like to keep their compile-time classpath separate from their run-time classpath.
IDEA doesn't support this directly, but the commonly accepted workaround for that is to do the following:
- setup a "run module" for the root of your multi-module project (this also helps you access any files that happen to be in the overall project, but outside any module subdirectory)
- add all the jars that you only need to runtime as module libraries of the "run module"
- setup the run module to depend on your normal source modules
- setup any junit/application/applet run configurations to point to use the run module's classpath
Problem is, I can't see any way to do a similar thing for facet related functionality.
Specifically, I have had class not found problems for two separate pieces of facet related functionality:
- Spring facet; custom namespace validation
(the initial class not found relates to a commons logging class)
- Hibernate facet: HSQL console and
(the inital class not found relates to a dom4j class)
I have made a forum post about this: http://intellij.net/forums/thread.jspa?threadID=270214
JetBrains have responded to the thread, but the justification for the current mode of operation is seriously flawed (IMO) - hence the Jira issue.
Or, you could stop having to deal with all these silly workarounds for complex configurations and just include proper support for multiple classpaths, ala Netbeans: http://www.netbeans.org/kb/55/using-netbeans/project_setup.html#96961
But that's a separate issue 