Skip to main content
Jump to: navigation, search

Modeling Project Builds/Utilities

< Modeling Project Builds
Revision as of 16:42, 3 January 2011 by (Talk | contribs) (Modeling Project Builds / Utilities moved to Modeling Project Builds/Utilities over redirect: revert last change of the page's title (move))

This document describes utilities that simplify promotion of project builds run on a Hudson CI server. All of the utilities can be found on the server, in the /shared/modeling/tools/promotion/ directory.

download-artifacts.xml & download-artifacts.xsl

An ant script (complemented with an xsl stylesheet) to download artifacts produced by a single Hudson build. The artifacts are downloaded to a subdirectory of the current working directory; the name of the subdirectory is based on the timestamp of the specified Hudson build and (if available) on the build type:

[<build type>]<build timestamp in format "YYYYMMDDhhmm">

for instance - in case the build type ("S" in this example) was available:


or - in case the build type was not available - just:


/shared/common/apache-ant-1.7.1/bin/ant -f /shared/modeling/tools/promotion/download-artifacts.xml -Dbuild.url=<build URL> [ -Dartifact.prefix=<prefix> ]


build URL 
is a URL of the build that produced the artifacts to be downloaded, for instance:
is a prefix of artifacts (of their relative paths) which should be included in the download; artifacts with relative paths not starting with the specified prefix won't be included in the download; the prefix will also be stripped off of the relative paths of the artifacts before they are stored in the local filesystem
/shared/common/apache-ant-1.7.1/bin/ant -f /shared/modeling/tools/promotion/download-artifacts.xml -Dbuild.url= -Dartifact.prefix=result/site.p2/


An ant script to unpack (using the unpack200 tool) selected artifact from a p2 repository and update the repository metadata accordingly. The purpose of this tool is to be able to unpack artifacts known to cause problems when being unpacked with an older version of the unpack200 tool in advance with the newer version of the tool and thus avoid the problems.

cd <repository path>
ant -f /shared/modeling/tools/promotion/unpack-iu.xml -Dunpack.iu=<IU to unpack>


repository path 
is a directory in which the p2 repository containing the artifact to be unpacked resides
IU to unpack 
is the p2 ID of the IU corresponding to the artifact to be unpacked
cd S201012140905/
ant -f /shared/modeling/tools/promotion/unpack-iu.xml -Dunpack.iu=org.apache.derby


An ant script to simplify management of p2 composite repositories. It can add and remove child repositories from a composite repository.

cd <composite repository path>
ant -f /shared/modeling/tools/promotion/manage-composite.xml { add | remove } -Dchild.repository=<child repository URL> [<composite repository name> ]


composite repository path 
is a directory containing the composite repository (or a directory where the composite repository is to be created)
child repository URL 
is a URL of the child repository to be added/removed from the composite; note that the URL can be (and most often is) a relative URL
composite repository name 
is a name of the composite repository; this name is only used when a new composite repository is created, it is ignored if the repository already exists
cd /home/data/httpd/
ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=../4.0/S201012140905


An ant script to mirror one repository into another. It adds all artifacts (and associated metadata) found in one (source) repository into the other (target) repository.

cd <target repository path>
ant -f /shared/modeling/tools/promotion/mirror-repository.xml -Drepository=<source repository URL>


target repository path 
is a directory in which the target p2 repository resides
source repository URL 
is a URL of the repository to be mirrored to the target repository
ant -f /shared/modeling/tools/promotion/mirror-repository.xml -Drepository=/home/data/httpd/

Back to the top