Структура популярной папки для сборки

Мне интересно, какой популярный или лучший способ организовать ваши активы сборки и исходный код в проекте?

Ответы

Ответ 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!

Tree Surgeon - это генератор дерева разработки .NET. Просто дайте ему название вашего проекта, и он заработает для вас дерево разработки за считанные секунды. Более того, ваше новое дерево имеет многолетнюю ценность накопленного строительного опыта, встроенного в него.

Ответ 2

У меня

/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 в /build, но они появились в других проектах (например, в/websites/для некоторых).

Ответ 3

В общем:

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)

Ответ 4

Поскольку я работаю только над проектами Java, и все они "Mavenized", я использую соглашения определенные Maven для структуры проекта.

В принципе:

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.

Ответ 5

например, я использую следующие для моих проектов стиля .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

Ответ 6

Эта организация папок представляет собой эволюцию концепции xLim.

Вы можете проверить это в этот проект с открытым исходным кодом.

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

Ответ 7

Мне нравится способ Netbeans IDE организует проекты. Просто запустите новый проект, и он настроит дерево разработки по умолчанию и ant script.

Ответ 8

Для меня это зависит от размера проекта. Для небольших проектов я обнаружил, что каталог проектов с одним файлом Makefile,/src и /include работает хорошо.

Ответ 9

Для проектов .NET проверьте ProjectScaffold и обсудите это под gist.