On Jan 8, 2009, at 10:15 AM, ales wrote:

I do apologize because previous post was not 100% correct. :-( In my case does not matter whether plugin declaration is used. I have build.gradle:

defaultTasks 'foo'

createTask('foo') {
    println 'foo task'
}

cache does not exist, command gradle is successful. But when I change build.gradle by the following way:

defaultTasks 'foo'

createTask('foo') {
    println 'foo task done'
}

then the following error is raised:

Caused by: java.io.IOException: Unable to delete file: directory \.gradle\cache\build.gradle\cache.properties

Error is always raised after script change. For first time it works without any problem. It seems that there is not any other process which has a lock on directory\.gradle\cache\build.gradle \cache.properties. System information:

Thanks for checking this out. This problem seems only to occur under windows. None of the Gradle developers is working under windows and the integration tests (which run also under a windows machine) haven't detected this. I fire up my virtual windows machine now to check this out.

- Hans



----------------------------------------
Gradle 0.5.1
----------------------------------------

Gradle buildtime: Wednesday, January 7, 2009 12:26:37 PM CET
Groovy: 1.5.6
Ant: Apache Ant version 1.7.0 compiled on December 13 2006
Ivy: 2.0.0-rc2
Java: 1.6.0_02
JVM: 1.6.0_02-b06
JVM Vendor: Sun Microsystems Inc.
OS Name: Windows XP

Ales



ales  wrote / napísal(a):

Hi Allan,
I have the same problem. Everything works fine if my build.gradle contains something like this:

usePlugin('groovy')

defaultTasks 'foo'

createTask('foo') {
    println 'foo task'
}

If I change build.gradle by the following way:

defaultTasks 'foo'

createTask('foo') {
    println 'foo task'
}

and the plugin declaration usePlugin('groovy') is removed then the following error is raised:

Caused by: java.io.IOException: Unable to delete file: directory \.gradle\cache\build.gradle\cache.properties

I am a Gradle newbie but if I understand documentation correctly plugin declaration is optional so mentioned behaviour is not correct - it is a bug probably.

Ales



Allan Lewis  wrote / napísal(a):

I just tried grabbing 0.5.1, and I've come across a few issues.

First, if I try to do something as simple as 'gradle clean', I get:

Run with -d option to get additonal debug info. Please file an issue at:
www.gradle.org

org.gradle.api.UncheckedIOException: java.io.IOException: Unable to delete
file: C:\Documents and Settings\All
an\Workspace\koios-framework-trunk\koios-generator\.gradle\cache \build.gradle\cache.properties at org.gradle.util.GFileUtils.deleteDirectory(GFileUtils.java:192)
        at
org .gradle .groovy .scripts .DefaultScriptCompilationHandler .writeToCache(DefaultScriptCompilationHand
ler.java:70)
        at
org .gradle .groovy .scripts .DefaultScriptProcessor.loadViaCache(DefaultScriptProcessor.java:65)
        at
org .gradle .groovy .scripts .DefaultScriptProcessor.createScript(DefaultScriptProcessor.java:41)
        at
org .gradle .api .internal .project .BuildScriptProcessor.createScript(BuildScriptProcessor.java:48)
        at
org .gradle .api .internal.project.AbstractProject.evaluate(AbstractProject.java:504)
        at
org .gradle .api .internal.project.AbstractProject.evaluate(AbstractProject.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org .codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java: 86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java: 230) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at
org .codehaus .groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java: 778)
        at
org .codehaus .groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
        at
org .codehaus .groovy .runtime .ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
        at
org .codehaus .groovy .runtime .ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:198)
        at
org.gradle.configuration.BuildConfigurer $_closure1.doCall(BuildConfigurer.groovy:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org .codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java: 86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java: 230)
        at
org .codehaus .groovy .runtime .metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at groovy.lang.Closure.call(Closure.java:292)
        at
org .codehaus .groovy .runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:48)
        at
org .codehaus .groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:72)
        at $Proxy0.execute(Unknown Source)
        at
org .gradle .api .internal .project.AbstractProject.applyActions(AbstractProject.java:476)
        at
org .gradle .api .internal.project.AbstractProject.allprojects(AbstractProject.java: 471) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org .codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java: 86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java: 230) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at
org .codehaus .groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java: 778)
        at
org .codehaus .groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
        at
org .codehaus .groovy .runtime .ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
        at
org .gradle .configuration.BuildConfigurer.process(BuildConfigurer.groovy:51)
        at org.gradle.Gradle.runInternal(Gradle.java:115)
        at org.gradle.Gradle.run(Gradle.java:93)
        at org.gradle.Main.execute(Main.java:232)
        at org.gradle.Main.main(Main.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.gradle.BootstrapMain.main(BootstrapMain.java:53)
Caused by: java.io.IOException: Unable to delete file: C: \Documents and
Settings\Allan\Workspace\koios-framewo
rk-trunk\koios-generator\.gradle\cache\build.gradle\cache.properties
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390)
        at
org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
        at
org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
at org.gradle.util.GFileUtils.deleteDirectory(GFileUtils.java:190)
        ... 54 common frames omitted

Also, I get a different error if I try to use the gradlew wrapper. Calling
'gradlew clean -s' yields:

Build failed with an exception.
Run with -f option to get the full (very verbose) stacktrace.

Settings file 'C:\Documents and
Settings\Allan\Workspace\koios-framework-trunk\settings.gradle'

A problem occurred evaluating the settings file.
Cause: org/gradle/groovy/scripts/ScriptWithSource

Exception is:
org.gradle.api.GradleScriptException: Settings file 'C:\Documents and
Settings\Allan\Workspace\koios-framework
-trunk\settings.gradle'
A problem occurred evaluating the settings file.
        at
org .gradle .initialization .SettingsProcessor.applySettingsScript(SettingsProcessor.java:110)
        at
org .gradle .initialization.SettingsProcessor.process(SettingsProcessor.java:83)
        at org.gradle.Build.init(Build.java:129)
        at org.gradle.Build.run(Build.java:93)
        at org.gradle.Main.main(Main.java:235)
        at org.gradle.BootstrapMain.main(BootstrapMain.java:70)
        at
org .gradle .wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:38)
        at org.gradle.wrapper.Wrapper.execute(Wrapper.java:61)
        at org.gradle.wrapper.WrapperMain.main(WrapperMain.java:41)
Caused by: java.lang.NoClassDefFoundError:
org/gradle/groovy/scripts/ScriptWithSource
        at
org .gradle .groovy .scripts .DefaultScriptHandler.loadFromCache(DefaultScriptHandler.java:90)
        at
org .gradle .groovy .scripts .DefaultScriptProcessor.loadViaCache(DefaultScriptProcessor.java:66)
        at
org .gradle .groovy .scripts .DefaultScriptProcessor.createScript(DefaultScriptProcessor.java:45)
        at
org .gradle .initialization .SettingsProcessor.applySettingsScript(SettingsProcessor.java:101)
        ... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException:
org.gradle.groovy.scripts.ScriptWithSource
        ... 12 common frames omitted

BUILD FAILED

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to