SVN project structure

We go to SVN from VSS and discuss the project structure. We discuss two suggestions below.

No. 1 seems easier to support development, since the release version of the project is tied to a tag and the developer will only have to update this tag in order to get started immediately.

No. 2 guarantees that all projects and dependencies can be developed independently, but creating a specific version of a release means knowing the tags of the project and all these Dependencies.

Are there obvious comparative advantages between the two? Which are in two structures? Or are there better structures?

1.
Development  
  + trunk  
    Project1  
    Project2  
    Dependency1  
    Dependency2  
    Dependency3  
  + branches  
  + tags  

2.
Project1  
  + trunk  
  + branches  
  + tags  
Project2  
  + trunk  
  + branches  
  + tags  
Dependency1  
  + trunk  
  + branches  
  + tags  
Dependency2  
  + trunk  
  + branches  
  + tags  
Dependency3  
  + trunk  
  + branches  
  + tags  
+3
source share
7 answers

In general, I recommend that projects remain separate as far as it makes sense (your second option). This tends to facilitate reuse. (If I want only Dependency2, I don’t need to cite the whole other project to get to it.)

However, you must be smart about what your addictions will really do. For example, if Dependency2 is only a dependency for Project1, then it probably should only exist in the source structure of Project1. (Note: I do not mean separate branches and tags for Dependency - I mean that it will be another package or another subproject in Project1.)

, , -. . . , , , , . , . (, , , .)

№2 , . , .

  • A Project1.
  • B Dependency1, Project1.
  • , B , Dependency1 ( - , DLL - ). . : Dependency1-v1.0.0
  • A Dependency1-v1.0.0 . ( , /lib - .)
  • , A , .

, Team A Dependency1 . , , . A , . , B.

, , . , , , , , . , .

+1

# 2:

Project1  
  + trunk  
  + branches  
  + tags  
Project2  
  + trunk  
  + branches  
  + tags  
Dependency1  
  + trunk  
  + branches  
  + tags  
Dependency2  
  + trunk  
  + branches  
  + tags  
Dependency3  
  + trunk  
  + branches  
  + tags  

, , "SVN Externals" . SVN , .

+5

№2. , . , - . , - .

+1

, !

@JasCav, , , "" . , , :

Project1  
  + trunk  
       SubPrjFor_Prj1
       LibraryExternalRefs
           Dependency1_DLLOnly
           Dependency2_DLLOnly
           Dependency3_DLLOnly_NOT_SHARED_UsedOnlyByPrj1_ONLY_HERE
       LibraryWithSource
           Dependency4_UsedOnlyByPrj1_NOT_SHARED
                Source_SubFolder1
                Source_SubFolder2
  + branches  
  + tags  
Project2  
  + trunk  
       SubPrjFor_Prj2
       LibExternalRefs
           Dependency1_DLLOnly
  + branches  
  + tags  
Dependency1_UsedByBothPrj1Prj2  
  + trunk  
           Dependency1_DLLOnly
  + branches  
  + tags  
Dependency2_UsedByPrj1SoFar  
  + trunk  
           Dependency2_Source_SubPrj1
           Dependency2_Source_SubPrj2
  + branches  
  + tags  

, /.

ps @JasCav, , ; , , , , . , , , Stackoverflow, , .

: 4 .

+1

, , , VSS SVN-, . , SVN .

- ? ?

SVN, , , :).

0

, № 1.

:

TRUNK
--Build
--Product
----Source
------Project1
------Project2
------Project3
----Test
--ThirdParty

ThirdParty , , API.

, Trunk ( ), . - , .

-1

- . SVN Book .

ANT . № 2. - script. , , .

Maven, №1 , . SVN №1. , , # 1 # 2 . - :

    Project1
        trunk
            project1A
            project1B
            dependency1C
            dependency1D
        branches
        tags
    Project2
        trunk
            project2A
            dependency2B
        branches
        tags

, . , - № 2.

# 1: URL- SVN- .

-1

Source: https://habr.com/ru/post/1784155/


All Articles