What are the possibilities to enforce certain package dependencies in a java build system? E.g. the myapp.server.bl.Customer class not allowed to refer to the myapp.client.ui.customlayout package. I'm interested in either Ant or IDE-specific solutions.
I'd like to get an error message in the build process indicating that a (custom) package dependency rule has been violated and the build aborted. I also would like to maintain the dependencies in a list, preferably in a text file, outside of the ant scripts or ide project files.
(I don't know Maven but I've read it here it has better support for module dependency management)