I'm not sure if I'm just doing things wrong or if I've run across a bug. I have a Spring project setup with source and test directories. I have a set of Spring configuration files for production and a set for unit tests. I have File Sets defined for both to keep them separate. The problem is that I'm using annotation based configuration and IDEA is saying that it can't autowire the beans because there are multiple definitions for the beans i'm attempting to inject (one defined in the production configuration and one in the test configuration). Since I have File Sets defined for both, it was my assumption that IDEA would not confuse the two by thinking they are both part of the same configuration (isn't this the purpose of File Sets?). Am I just setting this up wrong or is this a bug? What is the proper way to have production and unit test Spring configurations in the same project without having IDEA consider them as all one big configuration?