| Author |
SVN and Project Structure Help
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
We are working on a project that currently will contain 2 modules. For now, we will just call them retail and admin. We are trying to figure out a good way of setting up our repositories so that we can share common codebase betwee nthe 2 modules without it turning into a maintenance nightmare. We thought that we might be able to use the svn:externals but that is only on a directory level basis and there will be directories that have both shared and module specific resources. Has anyone had to do something similar that cares to share their experiences and how they approached this? I'm not sure what other information one might require to help, but if you need anything else, ask and I'll see what I can provide. Thanks.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26141
|
|
Gregg, In CVS, we would put the common code in a separate project and have the other two projects refer to it. Is there any reason you can't do that in SVN. I haven't used it much, but I can't think of any inherent reason it wouldn't work.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Originally posted by Jeanne Boyarsky: Gregg, In CVS, we would put the common code in a separate project and have the other two projects refer to it. Is there any reason you can't do that in SVN. I haven't used it much, but I can't think of any inherent reason it wouldn't work.
We are currently switching to SVN, and I can tell you: no, there is no reason to not do the same in SVN. In fact that's exactly what I would do.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Thanks to both of you. We started discussing that late yesterday. Now, we just have to figure out how to do it. Thanks again.
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
|
|
|
This may be a silly question, but what is preventing you from putting all the code (both "modules" and the shared code) in the same repository?
|
A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
|
 |
Vijay Vaddem
Ranch Hand
Joined: Feb 13, 2004
Posts: 243
|
|
Originally posted by Frank Carver: This may be a silly question, but what is preventing you from putting all the code (both "modules" and the shared code) in the same repository?
How about organizing in the structure? http://localhost/yourproject/ http://localhost/yourproject/modules/commonmodule http://localhost/yourproject/modules/retail http://localhost/yourproject/modules/admin Ensure that each module will have its own build scripts and the retail and admin modules depends on commonmodule to be build before building them. This means, the root folder 'yourproject' will call commonmodule ---> retail ---> admin and so on.. Hope this helps.. Vijay
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Originally posted by Frank Carver: This may be a silly question, but what is preventing you from putting all the code (both "modules" and the shared code) in the same repository?
Ah, yes, sure, do that! I missed that part of the original question. As far as I can tell, it's the only way to have atomic commits across module boundaries....
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Don't forget that in SVN tags and branches are just directories. For ease of branching/tagging, setup the structure so that all modules share a common trunk directory:
Ensure that each module will have its own build scripts and the retail and admin modules depends on commonmodule to be build before building them.
Exactly! If you are using Eclipse, make each module its own Eclipse project.
|
 |
 |
|
|
subject: SVN and Project Structure Help
|
|
|