This module contains shaded (uber) JAR artifacts that bundle multiple Juneau modules together. These artifacts are useful for:
- Bazel Build System: Bazel requires explicit declaration of all dependencies. Shaded JARs simplify this by bundling transitive dependencies.
- Simplified Dependency Management: Projects can include one shaded JAR instead of managing multiple Juneau dependencies.
- Reduced Build Configuration: Less configuration needed in build files.
Artifact ID: juneau-shaded-core
Description: All core Juneau modules for general marshalling and configuration work.
Includes:
- juneau-commons
- juneau-assertions
- juneau-config
- juneau-marshall
Maven Usage:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-shaded-core</artifactId>
<version>9.2.0-SNAPSHOT</version>
</dependency>Bazel Usage:
maven_jar(
name = "juneau_core",
artifact = "org.apache.juneau:juneau-shaded-core:9.2.0-SNAPSHOT",
)Artifact ID: juneau-shaded-rest-client
Description: Everything needed for REST client development.
Includes:
- All modules from juneau-shaded-core
- juneau-rest-common
- juneau-rest-client
Maven Usage:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-shaded-rest-client</artifactId>
<version>9.2.0-SNAPSHOT</version>
</dependency>Bazel Usage:
maven_jar(
name = "juneau_rest_client",
artifact = "org.apache.juneau:juneau-shaded-rest-client:9.2.0-SNAPSHOT",
)Artifact ID: juneau-shaded-rest-server
Description: Everything needed for REST server development.
Includes:
- All modules from juneau-shaded-core
- juneau-rest-common
- juneau-rest-server
- juneau-rest-server-rdf
Maven Usage:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-shaded-rest-server</artifactId>
<version>9.2.0-SNAPSHOT</version>
</dependency>Bazel Usage:
maven_jar(
name = "juneau_rest_server",
artifact = "org.apache.juneau:juneau-shaded-rest-server:9.2.0-SNAPSHOT",
)Artifact ID: juneau-shaded-rest-server-springboot
Description: Everything needed for REST server development with Spring Boot integration.
Includes:
- All modules from juneau-shaded-rest-server
- juneau-rest-server-springboot
Maven Usage:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-shaded-rest-server-springboot</artifactId>
<version>9.2.0-SNAPSHOT</version>
</dependency>Bazel Usage:
maven_jar(
name = "juneau_rest_server_springboot",
artifact = "org.apache.juneau:juneau-shaded-rest-server-springboot:9.2.0-SNAPSHOT",
)Artifact ID: juneau-shaded-all
Description: The complete Juneau framework in a single JAR (excludes unit tests, examples, and distribution artifacts).
Includes:
- All modules from juneau-shaded-rest-server-springboot
- juneau-rest-client
- All juneau-bean modules (atom, html5, jsonschema, openapi-v3, swagger-v2)
- All juneau-microservice modules (core, jetty)
Maven Usage:
<dependency>
<groupId>org.apache.juneau</groupId>
<artifactId>juneau-shaded-all</artifactId>
<version>9.2.0-SNAPSHOT</version>
</dependency>Bazel Usage:
maven_jar(
name = "juneau_all",
artifact = "org.apache.juneau:juneau-shaded-all:9.2.0-SNAPSHOT",
)These shaded JARs only bundle Juneau modules. External dependencies (like Apache HttpClient, Jakarta Servlet API, Spring Boot, etc.) are still declared as transitive dependencies and must be managed separately.
When using shaded artifacts in Maven, transitive dependencies are automatically resolved. The generated dependency-reduced-pom.xml in each shaded module shows the actual external dependencies that will be pulled in.
When using shaded artifacts in Bazel, you must explicitly declare all external dependencies. To find out what external dependencies are needed:
- Check the
dependency-reduced-pom.xmlin the shaded module's target directory after building - Or use
mvn dependency:treeon the shaded module - Or refer to the individual Juneau module POMs to see their dependencies
Example Bazel configuration with external dependencies:
maven_jar(
name = "juneau_rest_client",
artifact = "org.apache.juneau:juneau-shaded-rest-client:9.2.0-SNAPSHOT",
)
maven_jar(
name = "httpclient",
artifact = "org.apache.httpcomponents.client5:httpclient5:5.2.1",
)
maven_jar(
name = "httpcore",
artifact = "org.apache.httpcomponents.core5:httpcore5:5.2.1",
)
# ... other external dependenciesThe Maven Shade Plugin automatically merges META-INF/services files from all included modules, ensuring that service providers are properly registered.
JAR signature files (*.SF, *.DSA, *.RSA) are excluded from shaded JARs to prevent signature validation errors.
To build all shaded artifacts:
cd juneau-shaded
mvn clean installTo build a specific shaded artifact:
cd juneau-shaded/juneau-shaded-core
mvn clean installThe shaded modules form a dependency hierarchy:
juneau-shaded-core
↓
juneau-shaded-rest-client
↓ (separate branch)
juneau-shaded-rest-server
↓
juneau-shaded-rest-server-springboot
↓
juneau-shaded-all (also includes rest-client + bean modules + microservice)
This hierarchy means:
juneau-shaded-rest-clientdepends onjuneau-shaded-corejuneau-shaded-rest-serverdepends onjuneau-shaded-corejuneau-shaded-rest-server-springbootdepends onjuneau-shaded-rest-serverjuneau-shaded-alldepends onjuneau-shaded-rest-server-springbootplus additional modules
- Using Bazel or another build system with strict dependency requirements
- You want simplified dependency management
- You're building a standalone application
- You want to minimize build configuration
- You need fine-grained control over dependencies
- You're building a library that will be used by others
- You want to minimize JAR size by excluding unused modules
- You need to avoid potential classpath conflicts in complex applications
All shaded artifacts are licensed under the Apache License 2.0, same as the rest of Apache Juneau.