Spring源码编译及过程中的一些问题总结

1、跳过测试

gradlew build -x test

2、编译失败,提示信息为

 Failed to create MD5 hash for file 'F:\code\spring-framework\build\distributions\spring-framework-5.0.5.BUILD-SNAPSHOT-schema.zip'

出现该问题,是因为windows环境下的路径寻找问题。
解决方法:修改项目中gradle配置的Zip路径
如果是master版本,则修改Spring-framework\gradle\docs.gradle文件
如果是4.3.x版本,则修改Spring-framework\build.gradle文件
查找 task schemaZip(type: Zip) 模块
 it.path.endsWith("META-INF/spring.schemas")
修改为
it.path.endsWith("META-INF\\spring.schemas")
it.path.endsWith(schemas.get(key))
修改为
 it.path.endsWith(schemas.get(key).replaceAll('\\/','\\\\'))
 

发布了1365 篇原创文章 · 获赞 71 · 访问量 140万+

猜你喜欢

转载自blog.csdn.net/wuli2496/article/details/104846023