I'm trying to build a gradle project but, when I try $ gradle build I get the following output:
Starting a Gradle Daemon (subsequent builds will be faster) > Task :jar FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':jar'. > Entry .classpath is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.0/dsl/org.gradle.api.file.CopySpec.html#org.gradle.api.file.CopySpec:duplicatesStrategy for details. * 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 11s 4 actionable tasks: 2 executed, 2 up-to-date After doing Get-ChildItem -Path ./ -Filter .classpath -Recurse -Force I concluded that I don't even have a single file named .classpath in my project. What do I do?
find . -name .classpath -type fin the root folder of your project.classpathin my projectEntry classpath.indexinstead of.classpath(google shows this question as first answer then), it's a problem caused by intellij. see: github.com/gradle/gradle/issues/17236. The "entry" is actually a file which exists with the same name in different folders, this is not very clear from the error message.