Ant4CF == Timesaver

I do a lot of development work, and a lot of the time-eating aspect of it used to be managing code (commiting, exporting, pushing to staging, production, etc), it was really an annoyance. Thankfully a few people from #coldfusion let me know of ant4cf (and ant in general) a while back and its been So much easier.

No more wasting time on unproductive things, now I can update, commit, and push straight to wherever the code needs to go without leaving my IDE. I figured I would share one of my simple build configs here to hopefully save someone else time.

<project name="Local Build Script" default="Build"> 
    <target name="Build">
        <input message="Please enter CFAdmin password:" addproperty="cfAdminPassword" />
         <input message="Please enter SVN username:" addproperty="svnUsername" /> 
         <input message="Please enter SVN password:" addproperty="svnPassword" /> 
        <input message="Please enter a Commit Message:" addproperty="commitMessage" />
        <taskdef name="configure" classname="com.alagad.ant4cf.Configure" classpath="antlib/ant4cf-java-2.0-SNAPSHOT-jar-with-dependencies.jar" /> 
        <taskdef name="remoteant" classname="com.alagad.ant4cf.RemoteAnt" classpath="antlib/ant4cf-java-2.0-SNAPSHOT-jar-with-dependencies.jar" /> 

        <echo message="Updating SVN" /> 
        <exec executable="svn">
            <arg line="commit -m '${commitMessage}'" /> 
        <configure ant4cfUrl="" adminPassword="${cfAdminPassword}" /> 
        <remoteant antfile="remoteBuild.xml" properties="cfAdminPassword,svnUsername,svnPassword" timeout="120" />

<project name="Remote Build" default="BuildRemote"> 
    <target name="BuildRemote">
        <taskdef name="configure" classname="com.alagad.ant4cf.Configure" classpath="antlib/ant4cf-java-2.0-SNAPSHOT-jar-with-dependencies.jar" /> 
        <taskdef name="service" classname="com.alagad.ant4cf.Service" classpath="antlib/ant4cf-java-2.0-SNAPSHOT-jar-with-dependencies.jar" />
        <property name="webroot" value="C:\inetpub\project_path" /> 
        <configure ant4cfUrl="" adminPassword="${cfAdminPassword}" /> 

        <!-- get the app --> 
        <echo message="Export App out of SVN" /> 
        <exec executable="svn">
            <arg line="export --trust-server-cert --non-interactive --force --username ${svnUsername} --password ${svnPassword} http://svn_url/project/ ${webroot}" /> 

        <!-- reload the application -->  
        <echo message="reload the application" /> 
        <get src="" dest="init.txt"/> 
        <delete file="init.txt" /> 

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

WordPress Appliance - Powered by TurnKey Linux