CARVIEW |
Select Language
HTTP/2 200
server: Apache
last-modified: Tue, 28 May 2024 15:18:17 GMT
etag: "2cd7-6198524b50300-gzip"
content-encoding: gzip
access-control-allow-origin: *
content-security-policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; script-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; style-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; frame-ancestors 'self'; frame-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; worker-src 'self' data: blob:;
content-type: text/html
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
age: 5612
date: Thu, 31 Jul 2025 09:19:18 GMT
x-served-by: cache-hel1410024-HEL, cache-bom-vanm7210065-BOM
x-cache: HIT, HIT
x-cache-hits: 4, 0
x-timer: S1753953559.544509,VS0,VE153
vary: Accept-Encoding
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-length: 2895
Apache Maven Shade Plugin – Usage
- Apache/
- Maven/
- Plugins/
- Apache Maven Shade Plugin/
- Usage
- | Last Published: 2024-05-28
- Version: 3.6.0
- Overview
- Introduction
- Goals
- Usage
- FAQ
- License
- Download
- Examples
- Selecting Contents for Uber JAR
- Relocating Classes
- Attaching the Shaded Artifact
- Executable JAR
- Resource Transformers
- Using another Shader implementation
- Project Documentation
- Project Information
- Project Reports
- Maven Projects
- Maven
- Archetypes
- Extensions
- Parent POMs
- Plugins
- Skins
- ASF
- How Apache Works
- Foundation
- Data Privacy
- Sponsoring Apache
- Thanks
Usage
Creating a Shaded JAR
The goals for the Shade Plugin are bound to the package
phase in the build lifecycle.
mvn package
Configuring Your Shade Plugin
<project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.6.0</version> <configuration> <!-- put your configurations here --> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ... </project>
Resource Transformers
ApacheLicenseResourceTransformer | Prevents license duplication |
ApacheNoticeResourceTransformer | Prepares merged NOTICE |
AppendingTransformer | Adds content to a resource |
ComponentsXmlResourceTransformer | Aggregates Plexus components.xml |
DontIncludeResourceTransformer | Prevents inclusion of matching resources |
IncludeResourceTransformer | Adds files from the project |
ManifestResourceTransformer | Sets entries in the MANIFEST |
ServicesResourceTransformer | Merges META-INF/services resources |
XmlAppendingTransformer | Adds XML content to an XML resource |
For more information, see samples.