Best way to prevent project from "exporting" transitive dependencies

The War plugin provides a providedCompile configuration that prevents a dependency from being part of the projects default dependencies. Is there a good way to accomplish this with a regular JAR project? I’d rather declare them in the project that define them, than the project that is depending on them.