WEB开发网
开发学院软件开发Java ivy教程(8)-使用ivy模块配置 阅读

ivy教程(8)-使用ivy模块配置

 2009-10-08 00:00:00 来源:WEB开发网   
核心提示: 仅使用自制jars来启动应用时很直接的,键入ant run-hm,ivy教程(8)-使用ivy模块配置(6),Buildfile:src\example\configurations\multi-projects\myapp\build.xmlresolve:[ivy:retrieve]::Iv

仅使用自制jars来启动应用时很直接的。

键入ant run-hm。

Buildfile: src\example\configurations\multi-projects\myapp\build.xml
resolve:
[ivy:retrieve] :: Ivy 2.0.0-beta1-local-20071104204849 - 20071104204849 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
[ivy:retrieve] no settings file found, using default...
[ivy:retrieve] :: loading settings :: url = jar:file:/c:/dev/data/opensource_workspace/ivy/build/artifact/ivy-
core.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: [ org.apache | myapp | working@BEN-ScokartG ]
[ivy:retrieve]     confs: [build, noexternaljar, withexternaljar]
[ivy:retrieve]     found [ org.apache | filter-framework | 1.3 ] in local
[ivy:retrieve]     [1.3] [ org.apache | filter-framework | latest.integration ]
[ivy:retrieve]     found [ commons-collections | commons-collections | 3.1 ] in public
[ivy:retrieve] :: resolution report ::
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |       build      |   1   |   1   |   0   |   0   ||   1   |   0   |
    |   noexternaljar  |   1   |   1   |   0   |   0   ||   2   |   0   |
    |  withexternaljar |   2   |   1   |   0   |   0   ||   3   |   0   |
    ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: [ org.apache | myapp ]
[ivy:retrieve]     confs: [build, noexternaljar, withexternaljar]
[ivy:retrieve]     0 artifacts copied, 6 already retrieved
build:
run-hm:
     [java] Filtering with:class filter.hmimpl.HMFilter
     [java] Result :[two, tree]
BUILD SUCCESSFUL
Total time: 3 seconds

很好,我们得到了同样的结果,但是我们可以看到实现的类是不一样的。

4) 结论

你应该尽可能多的使用配置。

配置是ivy中非常重要的概念。他们容许你按照意愿来分组制品。

当你书写假定要被重用的项目的ivy文件时,使用配置来容许人们只获取他们需要的东西,而不需要通过在依赖块中使用制品标签来手工指定。

上一页  1 2 3 4 5 6 

Tags:ivy 教程 使用

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接