tags:

views:

71

answers:

1

Ok, so i'm a little unclear on the proper way to do this and looking for some best practices/guidance. Say I'm working on multiple java based projects for a company ( CompanyProjectA & CompanyProjectB) and i'd like to make use of CompanyLibraries, and 3rd party tools. How would i set this up properly in CVS, so that dev teams can make changes to the common libs and have the be updated in the proper place in CVS?

In CVS, i'd like the tree to look like this

/cvsroot/CompanyLibriaries
/cvsroot/CompanyLibriaries/Source/com.company.common.libs.whatever
/cvsroot/CompanyProjectA
/cvsroot/CompanyProjectA/Source/com.company.projecta.whatever
/cvsroot/CompanyProjectB 
/cvsroot/CompanyProjectB/Source/com.company.projectb.whatever

Each developer would have their source laid out like this when they check this code out. Changes made to the common libs are checked into the common branch, changes made to projecta go to project a's tree

/devroot/CompanyProjectA
/devroot/CompanyProjectA/Source/com.company.projecta.whatever
/devroot/CompanyProjectA/Source/com.company.common.libs.whatever

/devroot/CompanyProjectB 
/devroot/CompanyProjectB/Source/com.company.projectb.whatever
/devroot/CompanyProjectB/Source/com.company.common.libs.whatever

Let me know if i'm being unclear.

Thanks, Roy

+2  A: 

Include common-libs.jar into both company projects. Developers can just use that jar or if they want to make common changes, they can check out the common-lib project into

/devroot/CompanyLibraries/Source/com.company.common.libs.whatever

and override the jar with the contents of CompanyLibraries. Then periodically build the common project and update the jar in both projects.

Cameron