推荐的源控制目录结构? [英] Recommended Source Control Directory Structure?
问题描述
我将在新的J2EE Web应用程序上使用Subversion进行源代码控制。你会建议用什么目录结构来组织代码,测试和文档?
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?
推荐答案
我通常有
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
在使用Visual Studio时,我不确定如果这在java世界中的工作方式相同。但我通常把东西放在src中的不同项目文件夹中。对于每个源项目,都有一个单独的测试项目。构建文件放在主项目目录中。我通常在那里放置一个自述文件,记录如何设置项目,如果它需要的不仅仅是检查。
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.
编辑:这是单个工作结账的结构项目。对于修订控制系统中的每个分支/标记,它将被复制(请记住,在大多数SVN系统中,副本很便宜)。 Subversion下的上述示例如下所示:
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屋!