ivy教程(6)-项目依赖
2009-10-08 00:00:00 来源:WEB开发网这里我们看到:
* 项目依赖2个类库(2个制品)
* 类库中的一个在缓存中因为仅有一个被下载(1 downloaded)
* ivy得到项目dependee的版本1. 对standalone.Main.getVersion()的调用返回1.如果你查看depender/lib目录,你将看到dependee-1.jar,这是项目dependee的版本1的制品。
* 对standalone.Main.capitalizeWords(str)的调用成功,这意味着在classpath中有需要的类库。如果你查看 lib目录,你将看到类库commons-lang-2.0.jar已经被获取。这个类库是项目"dependee"声明要使用的,因此ivy同样为了 depender项目而获得它。
step 5: dependee 项目的新版本
和我们在步骤3中做的类型,再次发行dependee项目。这将导致这个项目的新版本。
现在如果你查看你的仓库文件夹,你将发现dependee项目发行的2个版本。
让我们看这个:
I:\dependee>ant publish
Buildfile: src\example\dependence\standalone\build.xml
resolve:
[ivy:retrieve] :: Ivy 2.0.0-beta1-local-20071104204849 - 20071104204849 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = C:\dev\data\opensource_workspace\ivy\src\example\dependence\config\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: [ org.apache | standalone | working@BEN-ScokartG ]
[ivy:retrieve] confs: [default]
[ivy:retrieve] found [ commons-lang | commons-lang | 2.0 ] in libraries
[ivy:retrieve] :: resolution report ::
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 1 | 0 | 0 | 0 || 1 | 0 |
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: [ org.apache | standalone ]
[ivy:retrieve] confs: [default]
[ivy:retrieve] 0 artifacts copied, 1 already retrieved
compile:
jar:
[propertyfile] Updating property file: C:\dev\data\opensource_workspace\ivy\src\example\dependence\standalone\build\classes\version.properties
[jar] Building jar: C:\dev\data\opensource_workspace\ivy\src\example\dependence\standalone\build\standalone.jar
publish:
[delete] Deleting: C:\dev\data\opensource_workspace\ivy\src\example\dependence\standalone\build\ivy.xml
[ivy:publish] :: delivering :: [ org.apache | standalone | working@BEN-ScokartG ] :: 2 :: release :: Sun Nov 04 20:50:33 CET 2007
[ivy:publish] delivering ivy file to C:\dev\data\opensource_workspace\ivy\src\example\dependence\standalone/build/ivy.xml
[ivy:publish] :: publishing :: [ org.apache | standalone ]
[ivy:publish] published standalone to C:\dev\data\opensource_workspace\ivy\src\example\dependence\config/repository/standalone-2.jar
[ivy:publish] published ivy to C:\dev\data\opensource_workspace\ivy\src\example\dependence\config/repository/standalone-2.xml
[echo] project standalone released with version 2
BUILD SUCCESSFUL
Total time: 2 seconds
更多精彩
赞助商链接