Questions tagged [shadowjar]

About

Shadow is an extension of the Gradle Jar task that optimizes FatJar/UberJar creation by using JarInputStream and JarOutputStream to copy file contents. This avoids the unnecessary I/O overhead of expanding jar files to disk before recombining them. Shadow provides the similar filtering, relocation, and transformation capabilities as the Maven Shade plugin.

Links

101 questions
1
vote
0 answers

How To Use ShadowJar To Create A Jar File

Recently found out about gradle and really struggling to use ShadowJar Despite reading it repeatedly as i'm a slow learner (Just figured out how to add gradle dependency after a couple of weeks and still confused at how to configure ShadowJar) it…
1
vote
0 answers

Make ./gradlew build generate only shadowJar's jar file

When i do ./gradlew build, it generate 2 jar files in build\libs\ projectName.jar projectName-all.jar the normal ./gradlew build's generated jar file, and the shadowJar's one ( it's the one with "-all"). Since only the shadowJar's jar work, how…
arbi12321
  • 23
  • 4
1
vote
0 answers

EntityManager Bean creation exception only with ShadowJar, java.lang.IllegalArgumentException: Not a parameterized type. With Apache Beam libraries

I am getting the following error on entityManager bean creation, only when I am running a shadowJar. bootJar or bootRun doesn't give any exception; it works fine. I need to create a shadow…
1
vote
1 answer

How to address the gradle shadowJar issue in installtion of warp10-ext-influxdb plugin?

I'd like to use "warp10-ext-influxdb" plugin to be able to integrate with influxdb, fetch data and do analytics in warp10. I was following this link to proceed through installation of the plugin. However I was unsuccessful in making this command…
Sam
  • 11
  • 2
1
vote
1 answer

ShadowJar: How to include specific directories?

I am developing a java application using org.jdesktop.appframework. However the fat jar using ShadowJar is producing files I don't want in my jar. How can I remove all files except my project classes and the jdesktop dependency? Using the following…
Tien Do Nam
  • 3,630
  • 3
  • 15
  • 30
1
vote
1 answer

Beam pipeline not moving in Google Dataflow while running ok on direct runner

I have a Beam pipeline runs well locally with DirectRunner. However, when switching to the DataFlowRunner, the job started and I can see the flow chart from the Google dataflow web ui. However, the job does not run. It was hanging there till I stop…
1
vote
1 answer

Not work "include" in Kotlin script: ^ Unexpected tokens (use ';' to separate expressions on the same line)

In my build.gradle.kts: val shadowJar by tasks.getting(ShadowJar::class) { include '*.properties' } But I get error: Script compilation errors: Line 93: include '*.properties' ^ Unexpected tokens (use ';' to…
Alexei
  • 14,350
  • 37
  • 121
  • 240
1
vote
1 answer

upgrading to Gradle 5.2.1 does not generate a *-all.jar

I recently upgraded my java project to gradle 5.2.1, from gradle version 2.0. In gradle 2.0, doing a ./gradlew shadowJar created a file called: hthu-email-service-3.0.0-all.jar.. this file would ALWAYS be generated. After upgrading to 5.2.1, doing…
Rees
  • 1,757
  • 9
  • 33
  • 50
1
vote
0 answers

How to use minimize() from shadowJar properly?

In my configuration I have: shadowJar { minimize() archiveName = "fat.jar" } When I do fatjar, shadowJar doesn't includes my code from package mystdeim I found in documentation that I can force to exclude some dependencies from minimize by…
mystdeim
  • 4,802
  • 11
  • 49
  • 77
1
vote
1 answer

How do I make Dagger 1 and Dagger 2 coexist together in one Android project?

We have a huge codebase to migrate from dagger 1 to dagger 2 but we would like to do it step by step. For that we were thinking to have both versions as our project dependency and do the migration module by module. But we were unable to make it…
Binary Baba
  • 1,953
  • 2
  • 16
  • 23
1
vote
1 answer

Dependency shading in gradle

I am using a third party dependency which shades some jackson files as shaded.jackson.core.* or shaded.jackson.databind.* and uses it (as imports) in its application. However, I want to use a different version of jackson than the one shaded in this…
user2843283
  • 59
  • 1
  • 6
1
vote
0 answers

Module.4 exception when running a shadow jar, but works fine when not shadowed

I am using the johnrengelman shadow gradle plugin to package up my project into an executable jar. In this case, I seem to be getting some error related to the rsa crypto libraries, as seen below. Does anyone have suggestions on what I might need to…
TJ Tang
  • 921
  • 6
  • 17
1
vote
0 answers

specify Kotlin class as the Main-Class entry point in a MANIFEST.MF?

How do I explicitly tell shadowJar to use a Kotlin file as the entry point for the resulting uberJar? (Or, fat JAR as you prefer.) clumsily editing META-INF/MANIFEST.MF and the replacing it in the zip file (used the GUI to put it…
Thufir
  • 8,216
  • 28
  • 125
  • 273
1
vote
1 answer

Gradle ShadowJar output contains obfuscated and non-obfuscated classes

in my simple gradle build I would like to use ShadowJar and ProGuard together. I have found examples where the output of the shadowJar task is the input of the proguard one, which works fine, however in my case I would prefer first creating the…
jabal
  • 11,987
  • 12
  • 51
  • 99
1
vote
0 answers

How to create a gradle project which combines dependencies in one jar?

I'm trying to create a gradle project which combines some dependencies in one single obfuscated jar (for now, I don't care about the obfuscated part). These dependencies are other gradle projects, defined in settings.gradle. My project does not…
Thibaut D.
  • 2,521
  • 5
  • 22
  • 33