Given a project consisting of two Maven-based modules, foo-common and foo-server, how can I make foo-server resolve classes based on the locally modified foo-common rather than the foo-common dependency declared in its pom? I want to be able to make refactorings across foo-server and foo-common locally, then when I'm ready to commit the code, release foo-common, and update foo-server's pom to point to the new foo-common version before releasing it as well. I assume this is a typical pattern, but I can't quite figure out how to implement it properly.
I tried going to Poject structure -> foo-server -> Dependencies, then clicking the plus sign to add a module dependency on the local foo-common. This worked, but periodically the dependency disappears from foo-server's configuration, and I have to add it again. Possibly this is happening when I make updates to third-party dependencies in foo-server's pom.