This chapter explains some of the frequently used Apache Ivy Ant Tasks and Apache Ivy terminologies. We will explore them in detail throughout the tutorial.

Apache Ivy Ant Tasks

Apache Ivy comes with its own set of Ant Tasks which can be called from Ant build file. In this tutorial, we cover following Ivy Tasks

Table 2.1. Ivy Ant tasks

TaskDescription
ResolveResolves the dependencies described in ivy.xml and places the resolved dependencies in ivy cache.
CachepathConstructs an ant path consisting of artifacts in ivy cache which can be referred in other ant tasks through Ant path mechanism.
RetrieveCopies the resolved dependencies from cache to a specified directory
InstallInstalls a module to a specified repository. In this guide, Install task is used to install libraries from public repository to a local/shared repository
PublishPublish a module to a repository.

Some of the frequently used terms by the Apache Ivy are

Table 2.2. Ivy Terminology

TermDescription
OrganisationName of company, individual or team which created the software. Example: org.apache etc.
ModuleA module is a self-contained, reusable unit of software. Module normally has a version. Example: commons-lang, log4j etc.
Module DescriptorXML file containing the description or metadata of a module. Usually this file is named as ivy.xml
ArtifactArtifact is a single file ready for distribution. In Java it is normally a jar file. But it may be of any file type like zip, gz etc. Module contains one or more artifacts. Jar, Source jar and Javadoc jar are examples of artifact.
TypeType denotes the category of artifact. Example: jar, src, source, doc, bundle etc.
Artifact file name ExtensionExtension of an artifact. Example: jar, zip, tar, tar.gz etc
Module Revisionunique revision number or version name of a particular release of the module.
Status of Revisionindicates how stable a module revision is. Status of Revision has to be one of the following values.
  • integration: continuous build, a nightly build etc.
  • milestone: distributed but not yet finished fully.
  • release: tested and completed.
RepositoryDistribution site where ivy can find modules, descriptors and artifacts. Repository can be public, local or shared.
Ivy SettingsApache Ivy comes with a set of default settings, which enables it to run without any configuration by the user. Default settings may be overridden through an XML settings file which is usually named as ivysettings.xml

 

With that brief introduction to Apache Ivy terminology and Apache Ivy Ant Tasks, we are ready start with Apache Ivy.