[GRADLE-1976] (M5 / M6) Cannot lock the artifact cache, as it is already locked by this process Created: 30/Nov/11  Updated: 04/Jan/13  Resolved: 01/Dec/11

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 1.0-milestone-7

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

Seems like both milestone-5 and milestone-6 (I haven't tried M4) are having concurrency issues with cobertura during testRuntime if test forking and module dependencies are present at the same time.

Here's a simple project that reproduces the issue:
[1]https://github.com/johnburbridge/grad...

Note that this works fine when commenting out either this:

test {
forkEvery = 1;
maxParallelForks = 2;
}

or this:

axisGenAntTask module('org.apache.axis:axis:1.4') {
dependency 'javax.xml:jaxrpc-api:1.1';
dependency 'axis:axis-wsdl4j:1.5.1';
dependency 'commons-discovery:commons-discovery:0.2';
dependency 'commons-codec:commons-codec:1.3';
dependency 'javax.mail:mail:1.3.1';
}

But the combination of both causes this:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':test'.
    Cause: Could not resolve all dependencies for configuration ':testRuntime'.
    Cause: Cannot lock the artifact cache, as it is already locked by this process.

Also, interesting that setting forkEvery = 0 doesn't help any though one would expect that should help.

This works fine under milestone-3 provided you update mavenRepo url to urls.

HTH!
----------------------------------------------------------------------------------------
[1] https://github.com/johnburbridge/gradleBug/blob/master/build.gradle


Generated at Wed Jun 30 12:09:26 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.