问题描述
WEB-INF/lib
目录及其内容是否应由VCS进行版本控制?
Should the WEB-INF/lib
directory and it's contents be versioned by a VCS?
推荐答案
如果您可以轻松重建其内容,则反对对它进行版本控制.
If you can easily rebuild its content, I would argue against versioning it.
考虑到VCS的主要目标之一(管理历史记录并获取一个版本与另一个版本之间的增量),二进制文件的历史记录和增量通常无法在VCS中得到很好的管理.
Considering one of the main goals of a VCS (manage the history and get the delta between one version and the other), the history and delta of binaries is often not well managed in a VCS.
这些二进制文件最好通过工件存储库(例如Nexus)进行引用,在该存储库中,构建脚本(例如Maven)可以在需要的地方访问并复制它们(例如例如WEB-INF/lib
目录.
those binaries are best referenced through an artifact repository (like Nexus), where a building script (like Maven) can access and copy them where they are needed (like a WEB-INF/lib
directory for instance).
这篇关于WEB-INF/lib目录是否应该由版本控制系统进行版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!