我想知道在項目中組織您的構建資產和源代碼的流行或最佳方式是什麼?構建的流行文件夾結構
20
A
回答
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
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目錄的項目目錄效果很好。
0
對於.NET項目,請檢查ProjectScaffold並在此gist下進行討論。
相關問題
- 1. 構建文件夾結構的DataBase(datamodel)
- 2. 創建文件夾結構
- 3. Angular-cli構建文件夾結構
- 4. Ionic2構建文件夾結構丟失
- 5. 電子構建Windows文件夾結構
- 6. 流浪同步文件夾結構
- 7. 創建文件夾/文件結構
- 8. 文件夾結構
- 9. 文件夾結構
- 10. 文件夾結構創建從的csproj
- 11. 新建文件夾結構的環
- 12. PHP MVC文件夾結構/模型文件夾結構
- 13. 替換SVN文件夾結構與非SVN文件夾結構
- 14. 客戶端/服務器項目結構,文件夾結構,構建文件等
- 15. Django的文件夾結構
- 16. TFS 2017構建複製文件沒有文件夾結構?
- 17. 項目文件夾結構建議
- 18. NullReferenceException在創建文件夾結構時
- 19. 創建重複的文件夾和文件夾結構
- 20. 如何創建文件夾/文件(pdfs)結構(基本文檔結構/商店
- 21. CanJS文件夾結構
- 22. Laravel文件夾結構
- 23. PhoneGap www文件夾結構
- 24. PHP文件夾結構XAMPP
- 25. 資產文件夾結構
- 26. SVN文件夾結構
- 27. Java文件夾結構
- 28. Nightwatchjs文件夾結構
- 29. 項目文件夾結構
- 30. 與文件夾結構
「源代碼」庫(您自己構建的第三方庫還是inhouse庫?) – 2009-10-11 13:27:42
與上面完全一樣。對於第三方來源,它們在項目目錄中通常不需要。我通常會將任何開源代碼的源代碼保存在單獨的存儲庫中,以防萬一我需要它,但在其他情況下,請在「lib」文件夾 – Bealer 2010-04-26 12:15:27