Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We have the following SVN structure.

  • Projects: Our work
  • Clients: Projects for clients, needs to be different
  • Shared: Shared libraries we created
  • Docs: Documents explaining how software development flows within the company (has nothing to do with my question anyway)

Where should we put the external libraries? Let's say from opensource projects etc.

enter image description here

share|improve this question

2 Answers 2

Some people use Maven or similar solutions that automatically download libraries from various repositories as needed. It may be convenient, but then you're dependent on repositories maintained by some 3rd party. Getting some less popular libraries updated may be sluggish, and of course, most commercial libraries aren't available in public repositories.

We've simply put 3rd party libraries in our own repository under /lib/libraryname/tags/1.2.3/ and, using svn:externals, get those libraries to where they are needed. It may be a bit clumsy, some manual work is required to update the libraries, but at least your software is totally under your own control.

In technical sense, shared libraries are shared libraries regardless of who created them (you or someone else), so in your structure I would put them in /company/shared/3rdparty/etc.

share|improve this answer
1  
Fully agree. The external libraries definitely should be stored locally and /company/shared/3rdparty/... is good fit to the above structure. –  Jan Hudec Nov 23 '11 at 11:06

Instead of answering this question directly I will just tell you some ideas how that is done in ruby:

1) in a project root you have a one file, which has a list of libraries you would like to use with their version. like
"popular lib1, version > 2.0" ,

"popular lib 2, version 1.55, store in www.aaa.bbb/1.55.tgz",

"popular lib 3, stored on www.xxx.com/1.git, any version" So

2) the tool analyzes you version requirements and finds best version of libs (so all version requirements are matched). so you have some sort of ./cache folder which contains copy of downloaded files.

So for a c# I would always copy whole libraries in the project root folder, like libs3rdparty/ with name. I dont like any sort of shared libraries per whole companies, with such a cheep disk space there is no sense in that. As an option ( to make SVN size smaller) you could create an install.bat file which takes lib versions from certain places and adds the libs3rdparty to the svnignore.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.