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

Published by Jakub Holý

I’m a JVM-based developer since 2005, consultant, and occasionally a project manager, working currently with Iterate AS in Norway.

One thought on “Tools for Renaming the Package of a Dependency with Maven

Comments are closed.

%d bloggers like this: