This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

SVN and Project Structure Help

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41184
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to both of you. We started discussing that late yesterday. Now, we just have to figure out how to do it. Thanks again.
 
Sheriff
Posts: 6962
2
Eclipse IDE Debian Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vijay Vaddem:
How about organizing in the structure?

http://localhost/yourproject/
http://localhost/yourproject/modules/commonmodule
http://localhost/yourproject/modules/retail
http://localhost/yourproject/modules/admin



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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic