shade-jar - Man Page

rename Java namespace in JAR file

Synopsis

bin/shade-jar orig-namespace shaded-namespace in-jar out-jar

Description

shade-jar utility is means for changing JAR file namespaces. Basically it replaces all occurences of given pattern with a given replacement.  The replacament is performed on class file names and inside the class files themselves.  This is commonly known as shading.

Examples

shade-jar org.apache.log4j com.example.shaded.log4j /usr/share/java/log4j.jar lib/shaded-log4j.jar will replace all occurences of org.apache.log4j in JAR file /usr/share/java/log4j.jar with com.example.shaded.log4j and store the resulting JAR in lib/shaded-log4j.jar.

Bugs

Currently only class files are shaded.  Resources are not renamed. Neither contents of resource files nor manifests are processed.

Author

Written by Mikolaj Izdebski.

Reporting Bugs

Bugs should be reported through Java Packages Tools issue tracker at Github: https://github.com/fedora-java/javapackages/issues.

Info

2024-10-10 JAVAPACKAGES Java Packages Tools