简体   繁体   English

Java Maven项目缩小了构建

[英]Java Maven project minify the build

I am working on a multi module Maven project. 我正在研究一个多模块Maven项目。 We have created a project which builds an uber jar. 我们创建了一个构建超级jar的项目。 The unpacked jar is about 60mb which is a problem for our client. 未包装的罐子大约是60mb,这对我们的客户来说是一个问题。 Are there any tools we can use to remove unused .class files within the dependencies when the build is completed? 在构建完成时,是否有任何工具可用于删除依赖项中未使用的.class文件?

Another option would be if we could analyse what .class files are loaded when running and produce a list of these and thus remove others from the build manually. 另一种选择是,如果我们可以分析运行时加载的.class文件,并生成这些文件的列表,从而手动从构建中删除其他文件。

cheers, 干杯,

I'm not sure if it could remove classes as such, but proguard has some awesome results in terms of minifying class sizes. 我不确定它是否可以删除类,但proguard在缩小类大小方面有一些很棒的结果。 You can see from the link it reduces the Ant module by 90% 您可以从链接中看到它将Ant模块减少了90%

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM