Questions tagged [fatjar]
134 questions
4
votes
3 answers
Primitive Axon App run as Fat JAR Doesn't Autoconfigure Axon Beans
PROBLEM:
RESEARCH: At https://gitlab.com/ZonZonZon/simple-axon.git I've made up a simple Axon-app to show that JAR-artifact built with Gradle-plugin com.github.johnrengelman.shadow doesn't autoconfigure Axon beans when (when run as JAR). Though it…

Zon
- 18,610
- 7
- 91
- 99
4
votes
1 answer
How to include OJDBC driver in runnable jar?
I have a Java project, which connects to Oracle 12c database. Previously the ojdbc jar (and all other dependencies) had to be on the classpath for the jar to be able to run. However this is intended to be a standalone app, so I wanted to setup a…

Gábor Major
- 444
- 2
- 8
- 23
4
votes
1 answer
How to add local jar to fat jar as a dependency using maven?
I'm trying to build a fat jar to use it in some other place.
I use maven assembly plugin for that:
org.apache.maven.plugins
maven-assembly-plugin
3.1.1
…

Viacheslav Shalamov
- 4,149
- 6
- 44
- 66
4
votes
2 answers
Gradle: Uber Jar creation fails with "Could not expand ZIP"
I'm trying to create a Fat/Uber jar using Gradle. Unfortunately, I keep running into the following error:
> Task :fatJar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':fatJar'.
> Could not expand…

user2569618
- 517
- 3
- 16
- 42
4
votes
3 answers
Gradle: package multi-project into a single jar
I have a gradle multi-project and want to create a single jar (library) containing all the classes of my subprojects and external dependencies.
I have the following project structure. Each project has its own 3rd party dependencies. Common…
user7621344
3
votes
1 answer
how to set up a gradle task to create fatJar in Kotlin(1.4) Multiplatform project in build.gradle.kts
I was looking for a way to create a jar, that contains everything I need to have a fully working app that contains a frontend and a backend.
A fatJar was the solution, but how can I create a gradle task in a kotlin/multiplatform project that creates…

Bantolomeus
- 51
- 3
3
votes
0 answers
How to exclude resource folder during fat jar generation in spring boot by using maven build?
In my spring boot project, during the build process, I'm generating the fat jar and boot jar for my application.
Usecase: I have a scenario where I need to exclude the resource folder from the fat jar at the same time I need to include the same…

Ramakrishnan M
- 482
- 1
- 6
- 16
3
votes
0 answers
ClassNotFoundException when sending job through RestClusterClient
I have a flink job that runs fine when I upload it manually to my cluster (using the UI).
But when I try deploying it via the RestClusterClient, it fails giving me a ClassNotFoundException (I do see the job appear on the cluster, and failing).
val…

laurent exsteens
- 431
- 1
- 5
- 13
3
votes
1 answer
sbt shading two versions of a dependency
When I run my tests I see the following error:
Exception: java.lang.NoSuchMethodError: fs2.Stream$.bracket(Ljava/lang/Object;Lscala/Function1;Lscala/Function1;)Lfs2/internal/FreeC;
I first made sure my build file was cleaned up by explicitly…

codenoodle
- 982
- 6
- 19
3
votes
1 answer
Add git commit id in fat jar manifest using sbt
I am using sbt-assembly plugin to build a fat Jar for my scala project. Is there a way I can include git commit id in the jar manifest, something similar to what git-commit-id-plugin does for maven.
Thanks

Abdul Rahman
- 1,294
- 22
- 41
3
votes
0 answers
publish jar dependencies with 'maven-publish' plugin
I have a gradle project in IntelliJ IDE in java.
my dependencies is like this:
apply plugin: 'maven-publish'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
testCompile group: 'junit', name: 'junit', version: '4.12'
compile…

max
- 5,963
- 12
- 49
- 80
2
votes
1 answer
Why does excluding META-INF helps with " could not find or load main method " in gradle
I was trying to create a fat jar for my project in gradle . I was using this code to create the jar .
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
'Main-Class':…

Aman Kumar Sinha
- 407
- 6
- 17
2
votes
1 answer
`Implementation-Version` not in Manifest after `spring-boot-maven-plugin` repackage
Given this plugin config in a Maven pom.xml:
org.springframework.boot
spring-boot-maven-plugin
acme.Main
…

Stewart
- 17,616
- 8
- 52
- 80
2
votes
0 answers
pom.xml that works (Could not find or load main class/no main manifest attribute)
I have spent several hours on this and I'm unable to get it done. For a Maven/JavaFX-Application I am trying to get an executable jar. But whenever I build it with its dependencies and execute it with java -jar Kvn-jar-with-dependencies.jar I get…

Qohelet
- 1,459
- 4
- 24
- 41
2
votes
3 answers
Kotlin-multiplatform: ShadowJar gradle plugin creates empty jar
I tried to use ShadowJar gradle pluging to pack my ktor app into fat jar. But as result of shadowJar task i get every time almost empty jar. It contains only manifest (main class is properly set).
Gradle configuration (groovy):
import…

marcu
- 223
- 4
- 14