How to pull a set of Java classes from a jar and repackage them?

Hi,

I need to fetch a dependency jar from Maven repository, extract a set of Java classes and repackage them, and use the repackaged jar as a dependency in another project in the same build.

What would be the best way to do this? Should I add a separate subproject for producing this artifact? Should I implement a custom plugin for doing this or just define this “task” in the build file directly?

marko

1 Like