Unable to use Findbugs plugin with 1.2-rc-1

(Diwaker Gupta) #1

I have the following in my build.gradle

apply plugin: 'findbugs'
  repositories {

When I run ‘./gradlew findbugsMain’, it fails with:

FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':findbugs'.
> Artifact 'xerces:xercesImpl:2.6.2@jar' not found.

I’ve verified that xercesImpl 2.6.2 is actually present both in my local .m2 as well as (obviously) in Maven Central. Any ideas?

(Justin Ryan) #2

What happens when you flip it around?

repositories {
apply plugin: 'findbugs'

(Luke Daley) #3

Also, please try running with --refresh-dependencies

(Diwaker Gupta) #4

Yes, that seems to work though I’d say this is a bug. When I flip them around, gradle downloaded http://repo1.maven.org/maven2/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar even though that file exists in my local .m2 repo.

(Diwaker Gupta) #5

In fact, this doesn’t work:

  • flip the order (mavenCentral first) – works. At this point, xercesImpl should be in the local cache * flip it back (mavenLocal first) – fails with the same error as before

(Diwaker Gupta) #6

Luke, I tried with --refresh-dependencies and it doesn’t change the behavior.

(Luke Daley) #7

Can you try running with ‘–refresh-dependencies’ and ‘–info’ and paste the logging when it’s trying to resolve xerces?

At this point, my only thought is that there’s a network issue between you and Maven Central. That, or a corrupt Gradle cache index, but I’d expect that to manifest differently.

(Diwaker Gupta) #8

Actually it might have been a corrupt mavenLocal index – that seems to be the problematic repo. If I remove it, everything works fine. I blew away the xerces part of the .m2 namespace and that seems to have fixed the problem. I think we can consider this resolved, for now – thanks!

(Carlo Luib-Finetti) #9

same for me. I also use a local maven repo for my artefact, and also had xerces there. When I purged the xerces directories, gradle dowloaded xerces into it’s filestore and the task findbugsMain was ok.