git包括从另一个存储库编译的dll [英] git include compiled dll from another repository
问题描述
我已经在这个事情上读了几个小时,没有成功。
这是我的情况:
i have been reading for couple hours on this matter with no success.
Here is my situation :
项目A的输出是一个编译dll文件巫婆用于其他项目
多人正在处理项目A
项目A有自己的存储库,让它命名为repoA
我可以'将项目的来源包括在其他项目中,我只能使用它编译的dll。
Project A's output is a compiled dll file witch is used on other projects
Multiple people are working on Project A
Project A has its own repository, lets name it repoA
I can't include the project's source in the other projects, i am only allowed to use it's compiled dll.
项目B是一个在应用程序中的Web应用程序
多个人正在项目B上工作
Project B is a web application in repoB
Multiple people are working on Project B
所有项目都在同一台机器上(本地服务器)
All projects are on the same machine(local server)
那么如何我可以将repoA的dll包含在所有其他项目(repoB ... repoZ)中,并在repoA更新时保持最新。
So how can i include the dll from repoA into all other projects (repoB ... repoZ), and keep it up-to-date whenever the repoA is updated.
我是使用VS2013和msysGit
I am using VS2013 and msysGit
推荐答案
二进制依赖是最好的管理:
The binary dependencies are best managed:
- 在不同的引用(与源代码控制参照不同):在
pom.xml中
- c $ c>文件(包含在其他项目中),以便声明所需的依赖关系(这样,每当您在其他项目中开始构建时,都会从Nexus获取依赖关系)
- in a different referential (different from a source control referential): an artificat referential like Nexus is best
- in a
pom.xml
file (included in the other projects) in order to declare the dependencies you need (that way, you get said dependencies from Nexus each time you start a build in the other projects)
我正在使用这种方法进行各种项目(不只是Java maven项目)
I am using this approach for all kinds of projects (not just Java maven projects)
ant -f %BUILD_SCRIPTS_DIRECTORY%\build.xml -lib Build\antlib dependencies
使用 build.xml
如:
<project name="aname" default="help" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<target name="dependencies" description="resolve dependencies" unless="run.test">
<artifact:pom id="pom" file="pom.xml" />
<artifact:dependencies filesetId="dep.builder" pomRefId="pom"/>
<delete dir="${pom.build.directory}"/>
<unzip dest="${pom.build.directory}" overwrite="true">
<fileset refid="dep.builder"/>
</unzip>
</target>
</project>
还有一个 pom.xml
声明依赖关系如:
And a pom.xml
declaring the dependencies like:
<dependencies>
<dependency>
<groupId>com.oracle.www</groupId>
<artifactId>oci</artifactId>
<version>10</version>
<type>zip</type>
<classifier>${targetplatform}</classifier>
</dependency>
<dependency>
<groupId>com.sophis.www</groupId>
<artifactId>stlport</artifactId>
<version>5.1</version>
<type>zip</type>
<classifier>${targetplatform}</classifier>
</dependency>
...
</dependencies>
这篇关于git包括从另一个存储库编译的dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!