The ideal way to split code in my opinion would be to put it in multiple source directories in the same project, and then configure the build path to set up one-way visibility between source directories. For example, the src/test/java folder would be able to see the src/main/java folder but not vice versa. Unfortunately, eclipse does not support that. It has a global classpath per project. Can't find the exact discussion, but similar to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=224708.
I can think of two alternatives:
1) Put multiple src directories in the main project, so everything is in that project's classpath. Periodically have a human or something else remove non-core src directories from the classpath and see if that causes compilation errors in the main src. I just tried removing the src/main/test directory from the classpath and was happy to see that the src/main/java folder still compiles.
2) A more heavy handed approach would be to create separate projects so you can actually enforce unidirectional classpath visibility. That's how I've been developing
HBASE-4676 which can be added to the main project as a separate jar. Main project still compiles without it. The downside of this is that having multiple projects is more configuration overhead, like you would probably need multiple svn repos.
I think moving towards #1 is a good start for core stuff while more exotic contributions could be made by submitting jars. I'll try to nudge us in this direction with
HBASE-4676, just wanted to make sure people agree that it's important =)