Skip to content

Leiningen plugin to shade dependencies based on the Apache Maven Shade Plugin

License

Notifications You must be signed in to change notification settings

obohrer/lein-uber-shade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lein-uber-shade

A Leiningen plugin to relocate classes/packages using the Maven Shade Plugin. lein-uber-shade can be useful if you submit your jar which will run in an environment which contains incompatible provided dependencies with your project. This will relocate classes packages matchings the relocations specified and update the paths in the uberjar to point to these new packages. Use with care.

This is inspired by https://github.com/redbadger/shade which allows you to relocate clojure namespaces

Usage

Use this for project-level plugins:

Put [lein-uber-shade "0.1.2"] into the :plugins vector of your project.clj.

To build the uberjar with shaded classes/packages/dependencies:

$ lein shade-uberjar

Configuration of the plugin: Add :uber-shade to your project to configure relocations. Example:

 :uber-shade {:relocations [{:from io.netty :to io.shaded.netty}]}

In this example we relocate all classes starting by io.netty to io.shaded.netty

License

Copyright © 2018 obohrer

Distributed under the Eclipse Public License either version 2.0 or (at your option) any later version.

About

Leiningen plugin to shade dependencies based on the Apache Maven Shade Plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published