I would like to use Eclipse to work on a Java project where the directory structure does not correspond entirely to the package structure.

For example, source files in the package `a.b.c` are located in the directory `x/y/c`. The name of the leaf package (`c`) always corresponds to the name of the immediately containing directory (also `c`), but their prefixes may be different (`a.b` versus `x/y`).

(I think the project's build system copies the source files into a directory structure that corresponds to the package structure, but I need to operate on the original files, not the copied files.)

When I look at source files in this project in Eclipse, I see errors of the form `The declared package "a.b.c" does not match the expected package "x.y.c"`, and it is also unable to resolve imports of the form `import a.b.foo`. How can I inform Eclipse of the mapping from `x/y` to `a.b` and get rid of these errors?

**Please do not suggest any solution that involves changing the package declarations or moving the files around. I cannot do either.**