What's the best way to manage reusable classes/libraries separately?

Posted by Tom on Programmers See other posts from Programmers or by Tom
Published on 2012-10-16T07:40:15Z Indexed on 2012/10/16 11:23 UTC
Read the original article Hit count: 221

When coding, I naturally often come up with classes or a set of classes with a high reusability. I'm looking for an easy, straight-forward way to work on them separately. I'd like to be able to easily integrate them into any project; it also should be possible to switch to a different version with as few commands as possible.

Am I right with the assumption that git (or another VCS) is best suited for this? I thought of setting up local repositories for each class/project/library/plugin and then just cloning/pulling them. It would be great if I could reference those projects by name, not by the full path. Like git clone someproject.

edit: To clarify, I know what VCS are about and I do use them. I'm just looking for a comfortable way to store and edit some reusable pieces of code (including unit tests) separately and to be able to include them (without the unit tests) in other projects, without having to manually copy files. Apache Maven is a good example, but I'm looking for a language-independent solution, optimally command-line-based.

© Programmers or respective owner

Related posts about version-control

Related posts about git