2009-01-15 174 views

回答

1

本人來說我用

/client/projectname/trunk/source/Solution Name.sln 
/client/projectname/trunk/source/Project.One 
/client/projectname/trunk/source/Project.Two 
/client/projectname/trunk/source/Project.Three 
/client/projectname/trunk/source/SQL/ 
/client/projectname/trunk/source/SQL/SomeScript.sql 
/client/projectname/trunk/libraries 
/client/projectname/trunk/resources/Nunit 
/client/projectname/trunk/resources/LLBLGEN 
/client/projectname/trunk/documentation 
/client/projectname/trunk/builds 

它工作正常的我們,但我不認爲這是最好的。 如果是有關.NET你也可以看看treesurgeon他們形容自己爲:

你曾經花了幾天時間建立一個新的開發樹?你有沒有花了幾天時間來建立幾棵開發樹?你甚至花了數週的時間試圖用一套最佳實踐來完善所有的開發樹嗎?

如果上述答案中的任何一個答案都是'是',那麼你會喜歡Tree Surgeon!

樹外科醫生是一個.NET開發樹生成器。只需將它命名爲您的項目名稱,它會在幾秒鐘內爲您設置一個開發樹。更重要的是,您的新樹擁有數年積累的豐富構建工程經驗。

4

例如,我爲我的.Net樣式項目使用以下內容;

/build/reports - reports and logs from the build process 
/build/artifacts - all output of the build process is copied here 
/src/ - all solution source code 
/lib/ - 3rd party or other build dependencies 
/tools/... - all other helper tools used in the build process 
/tools/nant - example tool 
/tools/nunit - example tool 
/myProject.sln - visual studio solution file (or other IDE) 
/default.build - nant build file 
+0

「源代碼」庫(您自己構建的第三方庫還是inhouse庫?) – 2009-10-11 13:27:42

+0

與上面完全一樣。對於第三方來源,它們在項目目錄中通常不需要。我通常會將任何開源代碼的源代碼保存在單獨的存儲庫中,以防萬一我需要它,但在其他情況下,請在「lib」文件夾 – Bealer 2010-04-26 12:15:27

5

因爲我只在Java項目上工作,並且他們都是「Mavenized」,所以我使用conventions defined by Maven for the project structure

基本上是:

project 
    src/main/java  --> source files 
    src/main/resources --> resources files (*.xml, *.properties, etc.) 
    src/test/java  --> source files for tests. 
    src/test/resources --> resources files for tests. 
10

一般:

src/  - source files 
src/tests - unit tests 
doc/  - documentation 
res/  - static resources (textures, locale database, level definitions etc) 
build/ - tools needed to build the system 
      project specific libraries and compilers 
Makefile - the makefile (make, test, clean etc) 
0

我喜歡Netbeans IDE組織項目的方式。只需啓動一個新項目,它將設置一個默認的開發樹和一個ant腳本。

15

/src - source files (test files are within a package 'test' here, or 'test' subpackage of what is being tested) 
/lib - required libraries 
/doc - text documentation and development notes 
/build - where we build (each separate build item within a subfolder here) 
/conf - configurations (each config, production, test, developer, etc gets a folder in here, and when building Jars and Wars the correct set is copied across) 
/extras - other stuff 
/extras/resources - resources that should be included within generated Jars, e.g., icons 

/websites - Web related content and configurations (each website in its own folder here) 
/websites/$site/webcontent - All the web content here 
/websites/$site/conf - website related configuration files here (instead of /conf) 
/websites/$site/build.xml - ANT build script for website that creates a war, etc 

(remember you might have an admin site and a public site for a single project, hence the multi-site configuration within a single project, or even site v1 and site v2, etc) 

在你到底有沒有這取決於項目本身是有點靈活,無論您是使用Ant或Maven。我使用ANT,並且將ANT腳本放入/構建,但是它們出現在某些項目的其他地方(例如/ in/websites/some)。

3

此文件夾組織代表xLim concepts的演變。

你可以在this open source project查看。

Build   - ignored from version control 
    Artifact  - build artifacts (grabbed by CC.NET from here) 
    Package  - generated zip or install packages 
    Test   - all assemblies for unit tests 
    Help   - autogenerated documentation 
Resource 
    Build   - plugins and extensions for NAnt/MSBuild 
    Library  - 3rd party dependencies 
    Tool 
    FxCop 
    ILMerge   
    NCover 
    NCoverExplorer 
    NUnit 
    SHFB 
    Wix 
Samples 
    SampleProject1 
    SampleProject2 
Source 
    Project1 
    Project2 

    GlobalAssemblyInfo.cs 
    VersionAssemblyInfo.cs - integration server updates this one 

Test 
    Project1.Tests 
    Project2.Tests   

Solution.build  - primary build file 
Solution.ccnet  - CruiseControl adapter for the build file 
Solution.sln   - Visual Studio 

go.cmd    - shortcut for launching the build file locally 
readme.txt   - licenses and overview 
SharedKey.snk   - for strong naming 
0

對我來說它取決於項目的大小。對於小型項目,我發現具有單個Makefile,/ src和/ include目錄的項目目錄效果很好。