문제

I have 2 different projects that share some common code. Therefore I'm about to create a Multi Module Maven project.

ParentModuleProject
-webModule
--common
--Module1
--Module2

-importerModule
--common
--Module1
--Module2

The applications Module1 and Module2 will have their own release cycles. They will not necessarily be released together. Also they will run on different servers. The common modules are just utility modules that share common code between all modules (like domain logic). They will never be released for themself.

Also the importer projects will define some batch jobs, and each batch job for each module will run on a different server. So all in all I will have 4 servers with 2x2 similar applications, but which will all have their own lifecycle. But they will share lots of code throught the common module.

Question: which of the project would make sense to have trunk/tags/branches svn structure? Only the submodules itself? Or would it also be useful later to have webModule, importerModule or even the root ParentModuleProject to have this structure?

When would this be useful? If I'd like to make tags/branches of all the modules contained in one tag? If so, and if all my modules have their own lifecycle, this will probably never be the case, so I can omit this svn structure in the 3 parent modules?

도움이 되었습니까?

해결책

As you mentioned common modules are utlity modules which will never going to get released so creating branch/tag/trunk folder for it will be of no use.

Since importerModule/Module1 , importerModule/Module2 , webModule/Module1 and webModule/Module2 have independent release cycle there is be a need of seprate Tag Trunk and Branch folder for them .

As SVN provides flexiblity to choose the way to maintain folder structure there can be many ways to handle the requirement but I like the following one:

Layout

Where webModule and importerModule will have the tag/trunk/branch structure.

--ParentModuleProject

---webModule

-----Trunk

------- common

------- Module1

------- Module2

-----Branches

------- Module1-R1

------- Module2-R3

-----Tags

------- Module1-R1-1.0-120413

------- Module2-R2-2.0-200313

---importerModule

-----Trunk

------- common

------- Module1

------- Module2

-----Branches

------- Module1-R6

------- Module2-R8

-----Tags

------- Module1-R5-1.0-120413

------- Module2-R7-2.0-200313

By using this layout you dnt have to manage seprate tag , trunk and branch folder for each module.

As the trunk will be contain the key components of you application webModule and importerModule and you can easily create release branches out of it for Module1 and Module2 like

svn copy "^/webmodule/trunk/module1" "^/webmodule/branches/module1-r1".

Seprate release branches of Module1 and Module2 will handle the different release cycles.

Since tag is just a snapshot of what you released keeping the tags of Module1 and Module2 together will not be an issue like

svn copy "^/webmodule/branches/module1-r1" "^/webmodule/tags/module1-r1-230413"

Hope this helps

Jyotsna

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top