You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------
Build time: 2023-08-17 07:06:47 UTC
Revision: 8afbf24b469158b714b36e84c6f4d4976c86fcd5
Kotlin: 1.9.0
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 11.0.17 (Amazon.com Inc. 11.0.17+8-LTS)
OS: Mac OS X 14.1.2 aarch64
Expected Behavior
On creating and running a shadow JAR created with ./gradlew :myModule:shadowJarMyBotService, all the code paths should work.
Actual Behavior
The code paths containing the library references from the top level build.gradle and even from the current module itself fail with NoClassDefFoundError error.
Gradle Build Script(s)
// for the module JAR for running functional tests
shadowJar {
zip64 true
manifest.attributes["Main-Class"] = "entrypoint.Entrypoint"
manifest.attributes["Launcher-Agent-Class"] = "org.aspectj.weaver.loadtime.Agent"
from sourceSets.test.output
from sourceSets.test.resources
from sourceSets.main.output
from sourceSets.main.resources
}
// needed for the Slackbot service
dependencies {
shadow("com.slack.api:bolt-socket-mode:1.36.1")
shadow("javax.websocket:javax.websocket-api:1.1")
shadow("org.glassfish.tyrus.bundles:tyrus-standalone-client:1.19")
shadow("org.slf4j:slf4j-simple:1.7.36")
}
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
// for running the Slackbot service
task shadowJarMyBotService (type: ShadowJar) {
zip64 true
archiveFileName = 'my-bot-service.jar'
manifest.attributes["Main-Class"] = "slackBot.MyBotService"
project.configurations.shadow.setTransitive(true);
configurations = [project.configurations.shadow]
from sourceSets.test.output
from sourceSets.test.resources
from sourceSets.main.output
from sourceSets.main.resources
}
The text was updated successfully, but these errors were encountered:
Shadow Version
Gradle Version
Expected Behavior
On creating and running a shadow JAR created with
./gradlew :myModule:shadowJarMyBotService
, all the code paths should work.Actual Behavior
The code paths containing the library references from the top level
build.gradle
and even from the current module itself fail withNoClassDefFoundError
error.Gradle Build Script(s)
The text was updated successfully, but these errors were encountered: