I have a project with a number of maven-based modules in it. All have add some extra directories (using Single Entry Module Library) added manually. When I start IntelliJ some of the modules lose these dependencies, others don't. It is consistenely the same modules, but I can't see any obvious reason whey this might be. For those that do lose the dependencies, I've noticed the iml file gets deleted and recreated during IntelliJ startup. Any idea what's happening and how I can stop the dependencies getting lost?