Apache Ivy 简明教程

Apache IVY - Settings File

Apache Ivy 遵循 Maven 原则,并附带许多默认配置。可以通过定义 ivysettings.xml 文件来覆盖默认设置。

Apache Ivy follows Maven principles and comes with lot of default configurations. Default settings can be overridden by defining a ivysettings.xml file.

<ivysettings>
   <properties file="${ivy.settings.dir}/ivysettings-file.properties" />
   <settings defaultCache="${cache.dir}" defaultResolver="ibiblio" checkUpToDate="false" />
   <resolvers>
      <ibiblio name="ibiblio" />
      <filesystem name="internal">
         <ivy pattern="${repository.dir}/[module]/ivy-[revision].xml" />
         <artifact pattern="${repository.dir}/[module]/[artifact]-[revision].[ext]" />
      </filesystem>
   </resolvers>
   <modules>
      <module organisation="tutorialspoint" name=".*" resolver="internal" />
   </modules>
</ivysettings>

Tags of Ivy Settings File

以下是 Ivy 设置文件的重要标签。

Following are the important tags of Ivy Setting file.

  1. property − To set an ivy variable. Cardinality: 0..n

  2. properties − To set an ivy variables using properties file. Cardinality: 0..n

  3. settings − To configure ivy with default values. Cardinality: 0..1

  4. include − To include another settings file. Cardinality: 0..n

  5. classpath − To add a location in the classpath used to load plugins. Cardinality: 0..n

  6. typedef − To define new types in ivy. Cardinality: 0..n

  7. lock-strategies − To define lock strategies. Cardinality: 0..1

  8. caches − To define repository cache managers. Cardinality: 0..1

  9. latest-strategies − To define latest strategies. Cardinality: 0..1

  10. parsers − To define module descriptor parsers. Cardinality: 0..1

  11. version-matchers − To define new version matchers. Cardinality: 0..1

  12. triggers − To register triggers on ivy events. Cardinality: 0..1

  13. namespaces − To define new namespaces. Cardinality: 0..1

  14. macrodef − To define a new macro resolver. Cardinality: 0..n

  15. resolvers − To define dependency resolvers. Cardinality: 0..1

  16. conflict-managers − To define conflicts managers. Cardinality: 0..1

  17. modules − To define rules between modules and dependency resolvers. Cardinality: 0..1

  18. outputters − To define the list of available report outputters. Cardinality: 0..1

  19. statuses − To define the list of available statuses. Cardinality: 0..1