Integrating External Sources in a Build

好久不见. 提交于 2019-12-12 13:04:44

问题


Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Department.Utility.

I've constructed a project for this and it has an automated build script (as does every other project).

My question is that I would like to refactor my existing projects to depend on this new project. One method that is quite basic but not exactly what I am looking for is to simply build my Utility project, copy the DLL to my lib folder in my consuming project, and check that DLL in with that consuming project.

I personally feel that method is quite poor. I would like to have a reference to my Utility project and will perform a svn-update and build of the Utility project before the build of the consuming project.

FYI, the kind of code that's in the Utlity project are Logging facilities, BDD Unit Testing classes, IoC faclities, and Common Company.Department focused classes.

Hope my question isn't too vague, but with some answers I may be able to sharpen the focus on exactly what I would like to do.

Lastly, this is for .Net projects and using NAnt as the build script, and svn for code versioning.


回答1:


Greg is right in that you will probably want to use the svn:external feature. I created a step by step guide on how to do this on Windows with TortoiseSVN. I found it quite confusing the first couple times I used it. I created the guide, so that I can look it up, because I don't do it all the time.

Using svn:externals with Windows




回答2:


Have you checked out the svn:externals feature? This allows you to make a different repository appear as a subdirectory of a higher level repository. If I understand what you're trying to do, this might help.



来源:https://stackoverflow.com/questions/142237/integrating-external-sources-in-a-build

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!