gradle-resolution-rules-plugin icon indicating copy to clipboard operation
gradle-resolution-rules-plugin copied to clipboard

Deny rule shows exception multiple times

Open nadavc opened this issue 9 years ago • 2 comments

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

nadavc avatar May 20 '16 17:05 nadavc

Guess the only way to avoid this behavior will be to make the dependency unresolvable by replacing the version, rather than throwing an exception?

DanielThomas avatar May 20 '16 17:05 DanielThomas

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.

nadavc avatar May 20 '16 17:05 nadavc