jakub holý

building the right thing, building it right, fast

Tools for Renaming the Package of a Dependency with Maven


If you need to rename the Java package of a 3rd party library, e.g. to include it directly in your project while avoiding possible conflicts, you can use one of the following Maven plugins (and they may be more) in the package lifecycle phase:
  1. Uberize plugin (latest - org.fusesource.mvnplugins:maven-uberize-plugin:1.20) - originally inspired by the Shade plugin, intended to overcome some of its limitations. Intended primarily to merge your code and dependencies into one jar.
  2. Shade plugin
  3. package-rename-task, Ant-based Maven plugin - I'm not sure whether this is further maintained