/*
- WHY:
- Creates a self-contained "fat/uber" JAR bundling application code and all runtime dependencies into a single file.
- Also relocated/repackages conflicting third-party library classes to avoid classpath collisions. *
- WHEN TO USE:
- - Building standalone executable microservices/CLI tools meant to run with
java -jar app.jar. - - Deploying Java Agents or plugin artifacts into external runtimes where transitive dependency conflicts exist. *
- WHEN NOT TO USE:
- - Spring Boot applications (use Spring Boot's native
bootJartask instead). - - Standard multi-module subprojects published as libraries to Artifactory/Maven Central (use standard
jar). * - HOW TO USE:
- - Execute conditionally: ./gradlew build -PenableShadow
- - Set 'mainClassName' or 'manifest { attributes 'Main-Class': ... }' if the JAR needs to be directly executable. */
Top comments (0)