我想要使用Gradle 1.7、Jetty 9.2和IntelliJ IDEA 13设置一个简单的Web应用程序。
以下是我在教程中找到的Gradle构建的典型配置行:
apply plugin: 'jetty'
sourceCompatibility = 1.5
version = '1.1'
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5'
// other dependencies
}
在IDEA中启动的配置位于 Edit Configurations...->Add->Gradle
,任务是 jettyRun
。
第一次运行时,一切正常,Jetty启动,Web应用程序可以在浏览器中使用。
但如果我更改了gradle.build
文件并重新运行任务,则会出现以下错误:
A problem occurred configuring root project 'gr3'.
Could not open buildscript class cache for build file 'D:\Work\priv\gr3\build.gradle' (C:\Users\Sazankov_LY\.gradle\caches\1.7\scripts\build_546r8n6d85n2abfbi95h2qqmh4\ProjectScript\buildscript).
Timeout waiting to lock buildscript class cache for build file 'D:\Work\priv\gr3\build.gradle' (C:\Users\Sazankov_LY\.gradle\caches\1.7\scripts\build_546r8n6d85n2abfbi95h2qqmh4\ProjectScript\buildscript). It is currently in use by another Gradle instance.
Owner PID: unknown
Our PID: 11948
Owner Operation: unknown
Our operation:
Lock file: C:\Users\Sazankov_LY\.gradle\caches\1.7\scripts\build_546r8n6d85n2abfbi95h2qqmh4\ProjectScript\buildscript\cache.properties.lock
唯一的方法是重新启动IDE才能继续工作。有什么想法吗?
.gradle
文件夹? - Opal