I have a library of common functions that I use in several different projects, which works fine on my local machine where I can just add the path to the library, but now that I've put several of my projects on GoogleCode, I'm not sure how to deal with the external library. Do I put copies of it in each project and try to keep them all synchronized with each other, or is there a better way?
A:
You never want to have multiple copes if your source code.
Simple way -> Have subprojects compile down to a .jar. Include the .jar in your main project. When you change a subproject, make a new .jar and copy it down.
Better way -> Use something like Maven to manage it for you
bwawok
2010-05-14 21:59:06
Or ivy with ant.
bmargulies
2010-05-14 22:08:14
What do you recommend for Python code?
Colorado
2010-05-14 23:54:28
+1
A:
I use subversion for source control and svn:externals to manage libraries. Since you're using Mercurial, you might have a look at using subrepositories.
Subrepositories is a feature that allows you to treat a collection of repositories as a group. This will allow you to clone, commit to, push, and pull projects and their associated libraries as a group.
Good luck!
Jeremy Kendall
2010-05-15 12:17:21