Stop Coding!

The Unofficial Flex Compiler Blog

Using Apache Ant To Run Parallel HFCD Builds

with one comment

In several of my previous posts about the use of the HFCD ant tasks,

I only mentioned in the build.xml example that you can connect to one HFCD server instance. What I did not mention was that you could script your build.xml to connect to multiple HFCD server instances by using the Apache Ant <parallel> task.

    <parallel>
        <hfcd hostname="host1" buildData="${basedir}/build.hfcd.1">
            ....
        </hfcd>
        <hfcd hostname="host2" buildData="${basedir}/build.hfcd.2">
            ....
        </hfcd>
        <!-- more hfcd tasks... -->
    </parallel>


The build.xml code snippet above shows the use of the Apache Ant <parallel> task with the <hfcd> task. If you are able to separate your extremely large project workspace into multiple pieces (e.g. project workspace with a large number of modules), you could use the above technique to distribute the build to multiple HFCD server instances, further improving overall build performance.

I did not mention it then because the above technique was not possible without being able to store the build data sent from multiple HFCD server instances separately. But now, it is possible. In the latest HFCD build (i.e. build 20100420), I added the buildData tag attribute to the <hfcd> task. The tag attribute specifies the directory where build data from a HFCD server instance should be stored.

The latest HFCD build is here:

http://bytecode-workshop.com/#section=downloads

The HFCD Ant Task Language Reference is here:

http://bytecode-workshop.com/hfcd/doc/HFCD-Ant-Task-Language-Reference.pdf

Written by Clement Wong

April 20, 2010 at 2:19 pm

One Response

Subscribe to comments with RSS.

  1. […] allows builds to be distributed to multiple machines on a local network. The HFCD ant tasks also make it easy to integrate HFCD with custom build systems or popular build […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: