ColdFusion Developer Week 2012

Adobe's second ColdFusion Developer Week kicks off today, June 4, and continues through Friday, June 8, 2012. Whether you're a new or experienced CFML developer, there's probably more than one session you'll find very interesting and useful. From basics to advanced language features, as well as frameworks and a focus on the new ColdFusion 10 release, there's just loads of good stuff, all provided via free online Webinars.

Check out the sessions and schedule, and sign up.

Like last year, I'll be presenting Improve Your Apps Through Unit Testing, tomorrow.

I also hope to revive this sleepy blog with some more interesting tid-bits soon, so stay tuned! It's been a busy year, but I've queued a number of topics for blog posts, so hopefully I can catch up a little in the near future.

SvnAnt Task/Type Definition Import

I'm finally getting wise and leveraging ANT more, and yesterday was my first attempt at integrating some Subversion tasks. I discovered SvnAnt rather quickly, but didn't have a good sense for the best way to leverage it. Marc Esher kindly helped with a response to my comment here.

Rather than repeating a bunch of path/fileset/typedef lines in every build file that requires SVN tasks, I decided to create a simple build file that would handle this type definition and allow me to place just one import line into each build file that requires SVN tasks.

To start, I downloaded the proper SvnAnt distribution (from here), unzipped the folder under my /opt directory (I'm running Ubuntu), and created a symbolic link to the folder so I can reference it as /opt/svnant.

Then, under my /opt/svnant folder I created a build file called svnant-typedef.xml with the following:

<!--
    This build file serves to map SvnAnt's task and type names to their implementing classes.
    This file should be located in the SvnAnt distribution folder root (parent directory of /lib).
    It can be imported to any build file, rather than repeating, for example:
    <import file="/opt/svnant/svnant-typedef.xml" />
-->

<project name="svnant-typedef" basedir=".">

    <!-- get directory of current build file -->
    <dirname property="svnant.basedir" file="${ant.file.svnant-typedef}" />

    <!-- file set for SVNAnt classpath reference -->
    <path id="svnant.classpath">
        <fileset dir="${svnant.basedir}/lib">
            <include name="*.jar" />
        </fileset>
    </path>

    <!-- task/type definitions for SVNAnt library -->
    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />

</project>

You can read about the ANT import task and its special properties here.

Now I need only import the above file in build file's that will use SVN tasks. Here's an example:

<project name="example" default="main" basedir=".">

    <import file="/opt/svnant/svnant-typedef.xml" />

    <target name="main">
        <svn svnkit="true" javahl="false">
            <export srcurl="file:///home/svn/example/trunk" destpath="/tmp/example" />
        </svn>
    </target>

</project>

BlogCFC was created by Raymond Camden.