Exlord
Exlord

Reputation: 5371

git include compiled dll from another repository

i have been reading for couple hours on this matter with no success.
Here is my situation :

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.

Project B is a web application in repoB
Multiple people are working on Project B

All projects are on the same machine(local server)

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.

I am using VS2013 and msysGit

Upvotes: 1

Views: 771

Answers (1)

VonC
VonC

Reputation: 1324537

The binary dependencies are best managed:

  • 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)

See "The Basics - Components, Repositories and Repository Formats".

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

With a build.xml like:

<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>

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>

Upvotes: 1

Related Questions