For example, if doing only local testing, check that box, so every time you hit the Run button, only local files will be deployed. Next time, you can click Run As > Ant Build without the elipsis and it will just run using the last configuration. If you want only the dev server, check that box. If you are doing only local testing, check only the deploy.local box. Here, you can simply check the deployment options you want to use. This brings up the Run dialog (clicking the option without the elipsis runs the build using the last known configuration). With these files in place, you can right-click on the build.xml file in the project and click Run As > Ant Build. The depends 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. You don't want these in your deployment directories. My build.xml file looks like this:Ĭopying files to dev FTP server $.Ī couple of explanations: the fileset 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. 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.properties file looks like this:ĭ=c:/inetpub/wwwroot/mysite I'll add a build folder to the root of the project, and add the build.properties and build.xml files to this directory. This is not always the case, and indeed not usually the case, but changing paths is easy enough in the script. I'm going to assume that the project will have all the files to be deployed at the root of the project. Simply change the properties in the property file. This makes it easier to set up a generic build script that can be reused. You can also set up a property file that contains details about your project. Basically, a build script is XML that contains a project tag and one or more target tags under it. 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. 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\_1.7.1.v20090120-1145\lib ColdFusion Builder has most of what is needed, with the exception of a couple of Java classes for the FTP functionality ( commons-net-*.jar and jakarta-oro-*.jar). 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. So I decided to start setting up projects in both. 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. 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 decided to start using ColdFusion builder alongside Dreamweaver for my development.