Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview

Table of Contents
minLevel2

Build Creator

The BuildCreator tool was devised to enable the easy generation of binary packages that include more than one source. The purpose of the build creator is to simplify the building of projects that require the combining of multiple sources. To aid discussion of the tool we shall look at the configuration file combining the Apache Qpid release with that of the BerkeleyDB Store plugin form JBoss. However, the tool is a general binary build tool written in Python.

...

The release scripts that are specified in the build files can contain a version macro keyword substitution $writeVersions(file). This will append details about the sources and patches used to generate this release artefact. If svn targets are used then the revision information will be added to the file.

...

Element

Desctiption

<name>

The name of this build. This is used to name directories on disk and to refer to this build directly on the command line.

<dependency>

This is a list of <source> entries that this build requires.

<targets>

This contains the two scripts one for <build> and one for <release>. The text in these scripts are executed in a shell rooted in the current directory.

Example Files

Writing release scripts

To easy the writing of release scripts there are a number of variables that have been predefined for your use. The source <name> values can be used as variables to refer to the root of that source's build location, in the examples below that would mean that $qpid would be converted in to builder/build/qpid. As mentioned above you can also define variables in the <environment> section of the configuration. Release scripts can contain a version keyword substitution $writeVersions(file). This will append details about the sources and patches used to generate this release artefact. If svn targets are used then the revision information will be added to the file.

Example Files

No Format

<builder>
    <environment>
        <version>M3.0
No Format

<builder>
    <environment>
        <version>M3.0-beta</version>
    </environment>

    <sources>
       <source>
            <name>qpid</name>
            <type>file</type>
            <url>http://people.apache.org/~aidan/qpid/M3-beta/qpid-incubating-M3-beta.tar.gz</url>
            <path>qpid-incubating-M3</path>
        </source>
        <source>
            <name>bdb</name>
            <type>svn</type>
            <url>https://svn.jboss.org/repos/rhmessaging/store/branches/java/broker-queue-refactor/java/bdbstore</url>
        </source>
    </sources>

    <patches>
        <patch>
            <name>BDB-Classpath</name>
            <type>file</type>
            <url>/local/patches/bdb-qpid-run-classpath.diff</url>
            <source>qpid</source>
            <prefix>2</prefix>
            <path>qpid-incubating-M3/qpid/java/<path>
        </patch>

    </patches>

    <builds>
        <include>builds/*.config</include>
    </builds>

</builder>
No Format
<builds>
    <build>
        <name>qpid-broker</name>

        <dependency>
            <source>[source-name]</source>
            <source>bdb</source>
        </dependency>

        <targets>
            <build>
                <script><![CDATA[

pushd $qpid/java
ant -Dproject.version=$version build
popd

cp $qpid/java/build/lib/qpid-broker-$version.jar $bdb/lib
cp $qpid/java/build/lib/qpid-broker-test-$version.jar $bdb/lib
cp $qpid/java/build/lib/qpid-common-$version.jar $bdb/lib
cp $qpid/java/build/lib/qpid-systests-$version.jar $bdb/lib
cp $qpid/java/build/lib/qpid-perftests-$version.jar $bdb/lib
cp $qpid/java/build/lib/qpid-junit-toolkit-$version.jar $bdb/lib

cd $bdb
ant build

]]>
                </script>
            </build>

            <release>
                <script><![CDATA[
# Create build package
mkdir -p $release/$build-$version
cp -r $qpid/java/build/* $release/$build-$version
cp $bdb/build/qpid-bdbstore.jar $bdb/lib/je-3.3.62.jar $release/$build-$version/lib
# Build release artifact
cd $release-3.3.62.jar $release/$build-$version/lib

# Build release artifact
cd $release/$build-version

# Create release revisions
echo "Qpid Broker Release : $version" > REVISIONS.txt
echo -n "Built:" >> REVISIONS.txt
date +%Y-%m-%d-%H%M >> REVISIONS.txt
$writeVersions(REVISIONS.txt)

cd ..

tar cvzf $build-$version.tgz $build-$version
]]>
                </script>
            </release>
        </targets>

    </build>
</builds>