The Holy Java

Building the right thing, building it right, fast

Tools for Renaming the Package of a Dependency with Maven

Posted by Jakub Holý on October 6, 2011

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
About these ads

One Response to “Tools for Renaming the Package of a Dependency with Maven”

  1. […] Tools for Renaming the Package of a Dependency with Maven […]

Sorry, the comment form is closed at this time.

 
%d bloggers like this: