gradle-resolution-rules-plugin
gradle-resolution-rules-plugin copied to clipboard
Deny rule shows exception multiple times
Reproduced in https://github.com/nadavc/repro-rules-exceptions
$ gw build
Using gradle at '/Users/ncohen/dev/tests/repro/gradlew' to run buildfile '/Users/ncohen/dev/tests/repro/build.gradle':
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'repro'.
> Failed to notify project evaluation listener.
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
> Dependency org.slf4j:slf4j-api denied by dependency rule: reproducing bug
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Guess the only way to avoid this behavior will be to make the dependency unresolvable by replacing the version, rather than throwing an exception?
I think we want to be more explicit about the fact we're making the dependency unresolvable. I suppose we could change the version to "DENIED_BY_RESOLUTION_RULES", but I'm not sure that's actually better than having 9 instances of a descriptive error.