Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

buildFatJar fails since upgrade to gradle 7.2

See original GitHub issue
./gradlew buildFatJar
To honour the JVM settings for this build a single-use Daemon process will be forked. See
Daemon will be stopped at the end of the build 

FAILURE: Build failed with an exception.

* Where:
Build file '/apps/was/jenkins/workspace/Compile_CruiseControl/cruise-control/build.gradle' line: 311

* What went wrong:
Could not determine the dependencies of task ':cruise-control:buildFatJar'.
> Could not get unknown property 'compile' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

* 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

5 actionable tasks: 5 up-to-date

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

FireBurncommented, Sep 21, 2021

This was enough to get it working locally:

diff --git a/build.gradle b/build.gradle
index 052963e2..0830a208 100644
--- a/build.gradle
+++ b/build.gradle
@@ -308,7 +308,8 @@ project(':cruise-control') {
   tasks.create(name: "buildFatJar", type: Jar) {
     archiveBaseName = + '-all'
-    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
+    duplicatesStrategy = DuplicatesStrategy.INCLUDE
+    from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
     with jar
FireBurncommented, Apr 13, 2022

Hmm, I’m not sure about this, I think it used to collect all the jars into one jar, but this has all the jars extracted into one jar

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How do I create an executable fat JAR with Gradle with ...
Mysteriously, the second line didn't seem to be required in Gradle 4.x, but my old build config suddenly stopped creating fat JARs once...
Read more >
Development appserver config poisened after execution of ...
My steps before encountering the problem: I added and executed the buildUberJar task to the build.gradle in order to create a docker image....
Read more >
gradle create fatjar Code Example - Code Grepper
create a single Jar with all dependencies task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'Gradle Jar File Example', ...
Read more >
Creating fat JARs using the Ktor Gradle plugin
The Ktor plugin provides the following tasks for creating and running fat JARs: buildFatJar : builds a combined JAR of a project and...
Read more >
New DrawFBP release - Google Groups
Open source code from your DrawFBP, edit and save, no problem. Compile and run your flow, just few clicks. Debug, easy. ... Also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found