Jaden Summerville
02/02/2025, 8:16 PMC:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph>gradle clean build --info --scan
Initialized native services in: C:\Users\jaden\.gradle\native
Initialized jansi services in: C:\Users\jaden\.gradle\native
The client will now receive all logging from the daemon (pid: 32604). The daemon log file: C:\Users\jaden\.gradle\daemon\8.12.1\daemon-32604.out.log
Starting 6th build in daemon [uptime: 22 mins 37.977 secs, performance: 98%, GC rate: 0.06/s, heap usage: 7% of 512 MiB, non-heap usage: 21% of 384 MiB]
Using 22 worker leases.
Now considering [C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph] as hierarchies to watch
Reusing configuration cache.
Now considering [C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Tasks to be executed: [task ':lib:clean', task ':lib:compileJava', task ':lib:processResources', task ':lib:classes', task ':lib:jar', task ':lib:assemble', task ':lib:compileTestJava', task ':lib:processTestResources', task ':lib:testClasses', task ':lib:test', task ':lib:check', task ':lib:build']
Tasks that were excluded: []
Resolve mutations for :lib:clean (Thread[#352,Execution worker,5,main]) started.
:lib:clean (Thread[#352,Execution worker,5,main]) started.
destroyer locations for task group 0 (Thread[#353,Execution worker Thread 2,5,main]) started.
Resolve mutations for :lib:compileJava (Thread[#353,Execution worker Thread 2,5,main]) started.
Resolve mutations for :lib:processResources (Thread[#354,Execution worker Thread 3,5,main]) started.
Resolve mutations for :lib:processTestResources (Thread[#355,Execution worker Thread 4,5,main]) started.
> Task :lib:clean
Caching disabled for task ':lib:clean' because:
Build cache is disabled
Task ':lib:clean' is not up-to-date because:
Task has not declared any outputs despite executing actions.
> Task :lib:clean FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lib:clean'.
> java.io.IOException: Unable to delete directory 'C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main\org\example
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main\org
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test\org\example
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test\org
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers
- and more ...
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 3s
1 actionable task: 1 executed
Watched directory hierarchies: [C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph]
Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at <https://gradle.com/help/legal-terms-of-use>. Do you accept these terms? [yes, no] gradle clean build --no-daemon^C¿Desea terminar el trabajo por lotes (S/N)?
^C
C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph>gradle clean build --no-daemon
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to <https://docs.gradle.org/8.12.1/userguide/gradle_daemon.html#sec:disabling_the_daemon> in the Gradle documentation.
Daemon will be stopped at the end of the build
Reusing configuration cache.
> Task :lib:clean FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lib:clean'.
> java.io.IOException: Unable to delete directory 'C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main\org\example
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main\org
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test\org\example
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test\org
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\classes
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\annotationProcessor
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java\main
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java\test
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers\java
- C:\Users\jaden\OneDrive\Desktop\carpeta\personal\code personal\githubProjects\Graph\lib\build\generated\sources\headers
- and more ...
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 8s
1 actionable task: 1 executed
Configuration cache entry reused.
I tried pausing my onedrive sync, running "gradle --stop" gradle --status tells me no more daemons are running although one becomes idle when I try to clean. I have nothing open but VScode and firefox. I have no files open but it cant delete the build directory.
Edit: I just tried it again and it works now but I didnt do anything different. Does anyone have any idea what happened?Mykola Markov
02/02/2025, 10:00 PMbuild
folders of your project from onedrive.
I'm curious what is the point to sync github projects to onedrive?Vampire
02/02/2025, 10:33 PMCan I ask debugging questions here?Sure, but please keep the original message small and put bigger snippets like your output to the thread of the initial message, that way the channel is much easier to follow, especially on mobile devices. For sharing build outputs or errors, most often a build
--scan
URL is the easiest and best way, as it also includes much more information that might help people trying to help you. 😉
As you say it is your first time you try using Gradle, let's start with a general advice. 🙂
Gradle is not Maven, so don't always run with clean
.
With most Maven builds it is better to always run with clean
to get reliable builds or even correct results.
With Gradle this is just a big waste of time, as you effectively disable what Gradle is best in, i.e. avoiding unnecessary work.
If you need to run a Gradle build always with clean
for some reason, then there is either a bug in Gradle, in one of the plugins you use, or in your build script, and you should try to fix that instead of using clean
to save a tremendous amount of time.
Another important point, never use the command gradle
. I do not even ever have any Gradle version installed locally. Each and every project should contain the 4 Gradle wrapper files, and you should always use the Gradle wrapper to run a build, as it defines exactly which version of Gradle should be used to run a given build for which the build was designed and is known working with. Imho any project not containing the 4 wrapper files has a build bug. (or is one of those rare cases where some rules disallow adding a JAR to the project VCS or similar)
Regarding the actual error you got, well, that is the joy of using Windows. If a file is locked by some process, another process cannot update or delete it. What caused this, noone here can tell you. My recommendation would actually be, switch to Linux. 😄 But assuming that this is not an option for you, there are tools like handle
or "Process Explorer" in which you can search for the process having an open handle to a given file, so these can tell you exactly which process is holding the locks that prevent Gradle from deleting the files.