Maven 编译偶现 bad class 问题
資深大佬 : bonke 1
请教个问题。
- maven 编译一个多 module 项目
- module A 依赖 module B
- module B build 成功
- module A 编译的时候,出现
[ERROR]:cannot access XXXX.XXXX.XXX (module B 中的一个类) [exec] bad class file:XXXX.XXXX.XXX [exec] unable to access file: corrupted zip file [exec] Please remove or make sure it appears in the correct subdirectory of the classpath. 但是 module A 最终提示 [exec] [INFO] BUILD SUCCESS
- 解压编译后 module A 的 jar 文件,发现 module A 这个包里没有 class 文件
- 解压 module B 的 jar,用 jd-gui 反编译 XXXX.XXXX.XXX ,提示 // INTERNAL ERROR //,其他类都正常。 但是用 Luyten 反编译正常,没有问题。
- 重新编译项目,没问题。jd-gui,Luyten 都反编译成功
- 将两次编译的 XXXX.XXXX.XXX 的 class 文件通过 Luyten 反编译对比,没有差异。
- 通过 javap -verbose 对比两个 class 文件,size,MD5 checksum 也是一致的。
大佬有話說 (0)