立即解析jar和dll

| 我将Ivy用于我的Lib存储库。我创建了自己的本地存储库,其中已经包含多个jar。这些已正确解决。 现在,我想添加一个由jar和dll组成的库。我应该如何将这些文件添加到存储库中,如何确保两个部分都正确解析?     
已邀请:
最好的方法是在存储库中为您的依赖项编写一个自定义ivy.xml,例如: 常春藤-1.0.0.xml
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<?xml-stylesheet type=\"text/xsl\" href=\"http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl\"?>
<ivy-module version=\"1.0\">
    <info 
        organisation=\"myorg\"
        module=\"depend\"
        revision=\"1.0.0\"
        status=\"release\"
        publication=\"20110207120000\"/>
    <configurations>
    <conf name=\"compile\" visibility=\"public\" />
    </configurations>
    <publications>
        <artifact name=\"jarfile\"      type=\"jar\" conf=\"compile\"/>
        <artifact name=\"ddlfile\"      type=\"dll\" conf=\"compile\"/>
    </publications>
</ivy-module>
这样,您可以轻松地检索所有工件作为依赖项:
<ivy-module version=\"2.0\"
            xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
            xsi:noNamespaceSchemaLocation=
                   \"http://ant.apache.org/ivy/schemas/ivy.xsd\">
<info organisation=\"myorg\" module=\"project\"/>
<configurations>
    <conf name=\"compile\" visibility=\"public\" />
</configurations>
<dependencies>
      <!-- COMPILE  -->
     <dependency org=\"myorg\" name=\"depend\" rev=\"1.0.0\" conf=\"compile\"/>
</dependencies>

</ivy-module> 
如果在构建的不同阶段需要依赖项,则可以为jar和dll提供不同的配置。 另外,您可以在ivy.xml中为您的项目指定工件,如下所述: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency-artifact.html     

要回复问题请先登录注册