我想知道在项目中组织您的构建资产和源代码的流行或最佳方式是什么?构建的流行文件夹结构
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