How can I exclude some stuff from the classes folder of a module A such that it won't be used when another module B declares a dependency on it. If I make the jar for module A exclude the files, and make B decl;are a jar dependency on A, then that's fine. But as is, I get the classfiles directly as per classpath packaging and it doesn't respect exclusions in my jar.