<?xml version="1.0" ?> 
<?xml-stylesheet type='text/xsl' href='rss.xslt' version='1.0'?>
<!--  RSS generation by 'Tom Muck's Blog' on Sun, 15 Mar 2026 06:44:27 GMT   --> 
<rss version="0.92">
	<channel>
		<title>Tom Muck's Blog: ColdFusion Builder/Eclipse</title> 
		<link>http://www.tom-muck.com/blog/?cat=17</link> 
		<description>Tom Muck's Blog</description> 
		<webMaster>tom.muck@gmail.com</webMaster> 
		<language>en-us</language> 
		<item>
			<title>Deployment Process in ColdFusion Builder</title>
			<description><![CDATA[<p>I decided to start using ColdFusion builder alongside Dreamweaver for my development. At work, we use Eclipse exclusively, but it is severely limited, and much of it doesn't work right (code hints...what the heck is hamcrestassert and why does it get inserted when I move to the next line???). I'm much more comfortable coding in Dreamweaver -- especially since the enhancements of CS4 and CS5 -- but have started liking the Ant build process and the Subversion integration of Eclipse/ColdFusion Builder. So I decided to start setting up projects in both. </p>
<p>My work environment is a lot different from the typical development workflow that I am accustomed to, so I wanted to set up an Ant build script for my local use on my laptop, and a remote FTP development server. ColdFusion Builder has most of what is needed, with the exception of a couple of Java classes for the FTP functionality (<a href="http://commons.apache.org/net/download_net.cgi" target="_blank">commons-net-*.jar</a> and <a href="http://www.java2s.com/Code/Jar/JKL/Downloadjakartaoro208jar.htm" target="_blank">jakarta-oro-*.jar</a>). Download these and add to the ColdFusion Builder (or Eclipse) plugins /lib folder for Ant, located here typically: C:\Program Files\Adobe\Adobe ColdFusion Builder\plugins\org.apache.ant_1.7.1.v20090120-1145\lib</p>
<p>I haven't found a lot of useful information for the ColdFusion developer on setting up Ant build scripts, so hopefully this will help someone. Basically, a build script is XML that contains a project tag and one or more target tags under it. You can also set up a property file that contains details about your project. This makes it easier to set up a generic build script that can be reused. Simply change the properties in the property file.</p>
<p>I'm going to assume that the project will have all the files to be deployed at the root of the project. This is not always the case, and indeed not usually the case, but changing paths is easy enough in the script. I'll add a build folder to the root of the project, and add the build.properties and build.xml files to this directory.</p>
<p>My build.properties file looks like this:</p>
<p class="code">#deploy to LOCAL server<br />
deploy.dir.local=c:/inetpub/wwwroot/mysite<br />
<br />
#deploy to DEV server<br />
deploy.dev.ftp.host=myftpsite.com<br />
deploy.dev.ftp.username=myusername<br />
deploy.dev.ftp.password=mypassword<br />
deploy.dev.ftp.basedir=/<br />
<br />
#deploy to LIVE server<br />
deploy.live.ftp.host=myliveftpsite.com<br />
deploy.live.ftp.username=myusername<br />
deploy.live.ftp.password=mypassword<br />
deploy.live.ftp.basedir=/
</p>
<p>It contains information on the local directory where I do local testing,  the FTP site where the development server resides, and the live server where the final deployment will happen. My build.xml file looks like this:</p>
<p class="code">&lt;project name=&quot;My Project&quot; basedir=&quot;../.&quot; default=&quot;deploy.local&quot;&gt;<br />
	&nbsp;&lt;!-- Load properties --&gt;<br />
	&nbsp;&lt;property file=&quot;build/build.properties&quot;/&gt;<br />
	<br />
	&nbsp;&lt;target name=&quot;deploy.local&quot; description=&quot;Deploy to local webserver&quot;&gt;&nbsp;&nbsp;<br />
	&nbsp;&nbsp;&lt;echo&gt;Copying files to local webserver...&lt;/echo&gt;<br />
	&nbsp;&nbsp;&lt;mkdir dir=&quot;${deploy.dir.local}&quot;/&gt;<br />
	&nbsp;&nbsp;&lt;copy todir=&quot;${deploy.dir.local}&quot;&gt;<br />
	&nbsp;&nbsp;&nbsp;&lt;fileset dir=&quot;.&quot;&gt;<br />
	&nbsp;&nbsp;&nbsp;  &lt;include name=&quot;**/*&quot; /&gt; <br />
	&nbsp;&nbsp;&nbsp;  &lt;exclude name=&quot;build/*&quot; /&gt; <br />
	&nbsp;&nbsp;&nbsp;&lt;/fileset&gt;<br />
	&nbsp;&nbsp;&lt;/copy&gt;&nbsp;&nbsp;<br />
	&nbsp;&lt;/target&gt;<br />	
	&nbsp;<br />
	&nbsp;&lt;target name=&quot;deploy.dev&quot; description=&quot;Release to remote dev webserver&quot;&gt;&nbsp;&nbsp;<br />
	&nbsp;&nbsp;&lt;echo&gt;Copying files to dev FTP server ${deploy.dev.ftp.host}...&lt;/echo&gt;<br />
&nbsp;&nbsp;&lt;ftp server=&quot;${deploy.dev.ftp.host}&quot;<br />
&nbsp;&nbsp;&nbsp;remotedir=&quot;${deploy.dev.ftp.basedir}&quot;<br />
&nbsp;&nbsp;&nbsp;userid=&quot;${deploy.dev.ftp.username}&quot;<br />
&nbsp;&nbsp;&nbsp;password=&quot;${deploy.dev.ftp.password}&quot;<br />
&nbsp;&nbsp;&nbsp;depends=&quot;yes&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;fileset dir=&quot;.&quot;&gt; &nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;  &lt;include name=&quot;**/*&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp;  &lt;exclude name=&quot;build/*&quot; /&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&lt;/fileset&gt;<br />
&nbsp;&nbsp;&lt;/ftp&gt;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&lt;/target&gt;<br />
&nbsp;<br />
&nbsp;&lt;target name=&quot;deploy.live&quot; description=&quot;Release to remote webserver&quot;&gt;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&lt;echo&gt;Copying files to live FTP server ${deploy.live.ftp.host}...&lt;/echo&gt;<br />
&nbsp;&nbsp;&lt;ftp server=&quot;${deploy.live.ftp.host}&quot;<br />
&nbsp;&nbsp;&nbsp;remotedir=&quot;${deploy.live.ftp.basedir}&quot;<br />
&nbsp;&nbsp;&nbsp;userid=&quot;${deploy.live.ftp.username}&quot;<br />
&nbsp;&nbsp;&nbsp;password=&quot;${deploy.live.ftp.password}&quot;<br />
&nbsp;&nbsp;&nbsp;depends=&quot;yes&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;fileset dir=&quot;.&quot;&gt; &nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;  &lt;include name=&quot;**/*&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp;  &lt;exclude name=&quot;build/*&quot; /&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&lt;/fileset&gt;<br />
&nbsp;&nbsp;&lt;/ftp&gt;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&lt;/target&gt;&nbsp;<br />
&lt;/project&gt;</p>
<p>A couple of explanations: the <em>fileset</em> tag includes the directory outside of the build directory (project root in this case), and the exclude tag excludes the build directory from the build process. You don't want these in your deployment directories. The <em>depends</em> attribute in the FTP tag allow you to exclude unchanged files from the FTP process, otherwise the build will FTP the entire project each time.</p>
<p>With these files in place, you can right-click on the build.xml file in the project and click Run As &gt; Ant Build.... This brings up the Run dialog (clicking the option  without the elipsis runs the build using the last known configuration). </p>
<p><img src="http://www.tom-muck.com/blog/images/build.jpg" alt="Ant Build Script for ColdFusion Builder" width="584" height="456" /></p>
<p>Here, you can simply check the deployment options you want to use. If you are doing only local testing, check only the deploy.local box. If you want only the dev server, check that box. You can also check any combination. Next time, you can click Run As &gt; Ant Build without the elipsis and it will just run using the last configuration. For example, if doing only local testing, check that box, so every time you hit the Run button, only local files will be deployed. The process is fast. Only changed files are deployed.</p>
<p><img src="http://www.tom-muck.com/blog/images/run.jpg" alt="Run button in ColdFusion Builder" width="200" height="60" /><br />
<em>Run button </em></p>
<p>When you run the build, the Console window will show the results of building</p>
<blockquote>
	<p style="color:blue">Buildfile: <u>C:\Documents and Settings\tmuck\Adobe ColdFusion Builder workspace\myproject\build\build.xml</u><br />
		deploy.local:<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:orange">[echo] Copying files to local webserver...</span><br />
		[copy] Copying 1 file to c:\inetpub\wwwroot\myproject<br />
		BUILD SUCCESSFUL<br />
		Total time: 407 milliseconds</p>
</blockquote>
<p>I hope that helps someone.</p>]]></description> 
			<link>http://www.tom-muck.com/blog/index.cfm?newsid=194</link>
			<guid isPermaLink="true">http://www.tom-muck.com/blog/index.cfm?newsid=194</guid>
			<pubDate>Mon, 14 Feb 2011 11:00:00 GMT</pubDate>
		</item>
	</channel>
</rss>


