I’m using gradle also to run my applications. One via a JavaExec task:
gradle run --no-daemon and another one via jettty run war (at the same time):
gradle jettyRunWar --no-daemon
With gradle version 1.0 milestone 3 this was possible, but with milestone 5 I get: FAILURE: Build failed with an exception.
What went wrong: Could not open cache directory /home/abc/.gradle/1.0-milestone-5-20110930174101+0200/taskArtifacts. Cause: Timeout waiting to lock cache directory /home/abc/.gradle/1.0-milestone-5-20110930174101+0200/taskArtifacts. It is currently in use by another Gradle instance. Owner PID: 25585 Our PID: 25558 Owner Operation:
Please has this been fixed? I am using gradle milestone 6 and appear to be running into the same issue, though the reason for the failure is well highlighted.
I have two web application, one makes use of the other and trying to run both of them from the command line seems impossible.
On the first web app, I am able to start the server fine using gradle jettyRun. On the second web app (after the first one has been started), if I invoke gradle jettyRun, it hangs for a while and later reports this error.
FAILURE: Build failed with an exception.
What went wrong: Could not open cache directory /Users/berinle/projects/sandbox/rebel-bug/.gradle/1.0-milestone-6/taskArtifacts. Cause: Timeout waiting to lock cache directory /Users/berinle/projects/sandbox/rebel-bug/.gradle/1.0-milestone-6/taskArtifacts. It is currently in use by another Gradle instance. Owner PID: 10348 Our PID: 10215 Owner Operation:
I have a buildSrc folder in my (multi)project which contains build logic. When running a concurrent build with gradle-1.0-milestone-7-20111228012857+0100, i still get a timeout on the lock:
FAILURE: Build failed with an exception.
What went wrong: Could not open cache directory buildSrc (/prg/projects/hydra\buildSrc/.gradle/noVersion/buildSrc). Cause: Timeout waiting to lock cache directory buildSrc (/prg/projects/hydra/buildSrc/.gradle/noVersion/buildSrc). It is currently in use by another Gradle instance. Owner PID: 1860 Our PID: 352 Owner Operation: Our operation: Lock file: /prg/projects/hydra/buildSrc/.gradle/noVersion/buildSrc/cache.properties.lock
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I suppose GRADLE-1801 hasn’t been tested with a project that has a /buildSrc folder? Should i create a separate issue for this, or is it an “overlooked” part of GRADLE-1801?
Interesting to see is that the lock file gradle attempts to lock is located in buildSrc/.gradle/noVersion, rather than buildSrc/.gradle/1.0-milestone-7-20111228012857+0100/