I am trying to generate Eclipse and IDEA projects for a play project using activator. When I tried doing this, it does a little, but then it hangs at:
Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...
At first I thought my running session of Intellij IDEA may be conflicting, I killed IDEA and the issue persisted. I closed activator, deleted the lock file, and restarted activator, but then it recreated the lock file and gave me the same issue. This is the full log I have been getting.
[info] Loading project definition from C:\Users\James\play-java\project
[info] Set current project to play-java (in build file:/C:/Users/James/play-java/)
[info] Applying State transformations com.typesafe.sbtrc.SetupSbtChild from C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-probe-0-13-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar;C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-props-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar
[info] Updating {file:/C:/Users/James/play-java/}root...
Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...
How can I fix the lockfile issue?
The .sbt.ivy.lock
file is used to synchronize access to your local ivy2 repository between several processes so they cannot modify the directory simultaneously. Usually the situation that you described happens when you have an IDE and Activator/sbt terminal running at the same time.
Even though you killed the Idea Process there could be another process spawned which was causing the lock so next time make sure that you kill all Java processes. However, the best solution for this issue is to avoid locking one process with another. So run only one process which uses the ivy2 repository at the same time.