Skip to main content
Jump to: navigation, search

Stardust/Knowledge Base/BuildChangeMgmt/Ivy

Retrieving Artifacts via Ivy Integrated Ant Task

You can use Apache Ivy ant tasks to receive the artifacts and build your work environment. For details on using Ivy, please refer to the Apache Ivy Site.

The following code snippets illustrate how for the configurations files can be configured:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="" xmlns:xsi=""
  <info organisation="<>" module="<ipp-client-tool>" revision="<x.y.z>" />
    <conf name="ipp-tools" />
    <dependency org="com.infinity.bpm" name="ipp-tools" rev="" conf="ipp-tools->default">
      <artifact name="ipp-tools" type="zip"/>
<pre><?xml version="1.0" encoding="UTF-8"?>
  <property name="ipp.m2.repository" value="" override="false"/>
  <property name="default.ivy.cache" value="/.cache" override="false"/>
    <cache name="ipp-tools-ivy-cache" basedir="" useOrigin="true" />
    <ibiblio name="ipp-releases" root="/ipp-libs" m2compatible="true" cache="ipp-tools-ivy-cache"/>
  <settings defaultResolver="ipp-releases"/>
<pre><?xml version="1.0" encoding="UTF-8"?>
<project name="retrieve-ipp-tools" default="retrieve-ipp-tools" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="ivy.install.version" value="2.2.0" />
<property name="ivy.jar.dir" value="/ivy" />
<property name="ivy.jar.file" value="/ivy.jar" />
<property name="ivy.settings.file" value="ivy-settings.xml" />
<property name="" value="" />
<property name="m2.server.auth.realm" value="Artifactory Realm" />
<property name="m2.server.auth.username" value="<i>username</i>" />
<property name="m2.server.auth.password" value="<i>password</i>" />
<property name="ipp.version" value="latest.integration" />
<!-- Downloading ivy -->
<target name="download-ivy" unless="" description="Downloading ivy">
  <mkdir dir=""/>
  <get src="" dest="" usetimestamp="true"/>
<!-- Installing ivy -->
<target name="install-ivy" depends="download-ivy" description="Installing ivy">
  <path id="ivy.lib.path">
    <fileset dir="" includes="*.jar"/>
  <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<!-- Setting up ivy -->
<target name="setup-ivy" depends="install-ivy" description="Setting up ivy">
  <ivy:settings id="ivy.instance" file="">
    <ivy:credentials host="" realm="" username="" passwd="" />
<!-- Retrieving IPP Tools -->
<target name="retrieve-ipp-tools" depends="setup-ivy" description="Retrieving IPP Tools">
  <ivy:retrieve conf="ipp-tools" pattern="[artifact].[ext]" type="zip"/>
  <unzip dest="." src=""/>

Run the build file to retrieve the archive. Please take care to use the right proxy settings in your Java environment.

Building your Work Environment via Ivy Integrated Ant Tasks

Unzip the downloaded or created file.

After doing so, you find a file in the etc folder. Open this file and set the appropriate user and password, e.g.: =
m2.server.auth.realm = Artifactory Realm
m2.server.auth.username = username
m2.server.auth.password = password

All needed Ivy files are downloaded as well:

  • ivy.xml - to declare the project's modules and dependencies.
  • ivy-settings.xml - to configure artifact resolution.
  • build.xml - to execute the ANT tasks for artifact resolution.

Now execute the ANT target retrieve-ipp-tools, which you find in the provided build.xml file.

All artifacts like documentation, runtime, client scripts etc., will be downloaded. To get an overview about the runtime dependencies, you can execute the ANT target report of the build.xml file. Per default, the latest integration is used to retrieve the appropriate version. Thus, you always get the latest version, that can be found in the repository. If you are interested in a specific version, you can either pass the version via a parameter, e.g.
or you can permanently store this parameter in the etc/ file.

Including Third Party Libraries

You need to set up a custom repository to include the following third party libraries:

  • jai-imageio-1.1.jar -
  • stax-ex-1.0.jar - org.jvnet.staxex
  • streambuffer-0.4.jar -
In your ivy-settings.xml, add your custom repository in the resolvers section, e.g.:
<ibiblio name="ipp-nondistributable"
m2compatible="true" cache="ipp-tools-ivy-cache"/>
In the chain section, add a reference to this repository:
<chain name="pull-ipp-deps">

... <resolver ref="ipp-nondistributable" /> ...


Back to the top