Ignore inconsistent module metadata found


(Sohrab Hosseini) #1

I can see this discussed in the Old forum but those suggestions don’t seem to work for me.

I have this mess of a dependency chain:

artifact-c (gradle) depends on artifact-b (maven) whose parent is artifact-a (maven).

When building artifact-c, I get the following error:

Could not resolve all dependencies for configuration ‘:compile’.
Could not resolve artifact-b:1.4
Required by:
artifact-c:0
Could not resolve artifact-b:1.4.
Could not parse POM [[artifact-b POM]]
Could not resolve artifact-a:1.3.
Could not resolve artifact-a:1.3.
inconsistent module metadata found. Descriptor: artifact-a:1.0 Errors: bad version: expected=‘1.3’ found=‘1.0’

Gradle is being clever and verifying the POM for me (not sure why this is a failure, rather than a warning to begin with). However I have not access to artifact-a and artifact-b to fix the POMs so I need it to ignore that error.

I tried

dependencies {
compile(‘artifact-b:1.4@jar’)
}

and

dependencies {
compile(‘artifact-b:1.4’) {
transitive = false
}
}

and

dependencies {
compile(‘artifact-b:1.4’) {
exclude module: ‘artifact-a’
}
}

even

configurations.compile.transitive = false

and also various combinations of all the above.

However in all instances it is still checking the POM and failing the build. Any ideas how I can get it to REALY ignore that problem?


(Ra) #2

Any updates on how to fix this?