And*_*rov 3 java ant ivy dependency-management
如果我的ivysettings.xml文件包含:
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
Run Code Online (Sandbox Code Playgroud)
我的ivy.xml文件包括:
<dependency org="org.junit"
name="com.springsource.org.junit"
rev="4.4.0" />
Run Code Online (Sandbox Code Playgroud)
从我运行Ivy开始,我就可以说这解析为:http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.4.0/com.springsource. org.junit来源-4.4.0.jar
决议如下:
[organization] => "org.junit"
[module] => "com.springsource.org.junit"
[revision] => "4.4.0"
[artifact] => "com.springsource.org.junit-sources"
[ext] => "jar"
Run Code Online (Sandbox Code Playgroud)
我看到常春藤如何解析URL模式(duh)中的[组织],[模块]和[修订],但它如何解析[artifact]和[ext]?
Ivy首先解析了<ivy pattern... />组织,模块和修订,并将[artifact]硬编码为"常春藤"并[ext]硬编码为"xml".这会产生一个URL,在这种情况下:
这是此模块的常春藤配置文件.此外,此常春藤配置文件包含有关其他工件的信息,特别是:
<artifact name="com.springsource.org.junit-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
Run Code Online (Sandbox Code Playgroud)
然后使用这两个来完成该<artifact pattern... />部分 - 下载许可证并下载jar文件.