Java Minimize Dependencies

前端 未结 3 809
悲&欢浪女
悲&欢浪女 2021-02-06 13:11

I have a situation where there is a small piece of Java code that has a large number of jars that it depends on. However, the dependencies inside these jars are very shallow. In

相关标签:
3条回答
  • 2021-02-06 14:00

    As far as I know, this is maven only, but it's a good start

    Maven Shade Plugin: This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.

    0 讨论(0)
  • 2021-02-06 14:02

    ProGuard does shrinking/optimizingh and also obfuscation. I think you can config it to do just one or the other.

    0 讨论(0)
  • 2021-02-06 14:11

    Classdepandjar will strip down a codebase to the essential classes. It's used in the Jini world for delivering optimally-sized jars, but there's nothing Jini-specific about it.

    Available as an Ant task.

    0 讨论(0)
提交回复
热议问题