推荐的源代码管理目录结构? [英] Recommended Source Control Directory Structure?
问题描述
我将在新的 J2EE Web 应用程序上使用 Subversion 进行源代码控制.你会推荐什么样的目录结构来组织代码、测试和文档?
我通常有
<前>项目目录src - 实际来源doc - 文档lib - 从源代码引用的库dep - 不适合 lib 的依赖项的安装文件db - 数据库安装脚本在使用 Visual Studio 时,我不确定这在 Java 世界中是否也一样.但我通常把东西放在 src 的不同项目文件夹中.每个源项目都有一个单独的测试项目.构建文件位于主项目目录中.如果项目需要的不仅仅是检查,我通常也会在那里放一个自述文件来记录如何设置项目.
这是项目的单个工作签出的结构.它将为您的修订控制系统中的每个分支/标签复制(请记住,在大多数 SVN 系统中,副本很便宜).Subversion 下的上述示例如下所示:
/项目/树干/源/文档/.../分支/功能1/源/文档/.../功能2/源/文档/...
I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation?
I usually have
Project Directory src - actual source doc - documentation lib - libraries referenced from source dep - installation files for dependencies that don't fit in lib db - database installation script
In work with Visual Studio, I'm not sure if this works the same in the java world. But i usually put stuff in different project folders in src. For each source project there's a separate test project. Build files go in the main project directory. I usually put a README there too documenting how to setup the project if it needs more than just checking out.
EDIT: This is the structure for a single working checkout of the project. It will be duplicated for each branch/tag in your revision control system (remember, in most SVN system, copies are cheap). The above example under Subversion would look like:
/project
/trunk
/src
/doc
/...
/branches
/feature1
/src
/doc
/...
/feature2
/src
/doc
/...
这篇关于推荐的源代码管理目录结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!