Need to Refactor Transfer to meet your server layout? Here you go!

Need to Refactor Transfer to meet your server layout? Here you go!

Posted by Luis Majano
Mar 21, 2007 00:00:00 UTC
As you all now, the best and easiest way to install Transfer is just by droping it in your web root and boom, you are ready to roll. However, sometimes you need the flexibility to change the path and things just work. Well, I just created this ANT task to do that. It will ask you for a new base path and a new relative path, then it will refactor the entire Transfer codebase to meet your directory layout. This similar Task is included with ColdBox in the install directory, so you can refactor the ColdBox codebase to your layout.


I have my frameworks under a directory called: 'frameworks' and I usually create a version to them, say: frameworks.coldbox2_00 or frameworks.transfer0_63

Everybody has their own naming conventions and ideas. Anyways, here is the ANT Task.

This ant task will rebuild colspring using a prefix of choice

The prefix choosen is: ${Setting: transfer.newprefix not found}

Refactoring: ${Setting: basedir not found}


You just need to place this as build.xml or refactor.xml in the root of your Transfer directory, where the TransferFactory.cfc is. Then just run it, it will ask you for the first path, type "frameworks.transfer0_63" then the relative path, type "/frameworks/transfer0_63" and then you are ready to roll.

Just make sure when you instantiate the factory it will now be: "frameworks.transfer0_63.TransferFactory"

There you go. Make sure you make a backup, just in case, or if you are a real geek, then keep it, so you can run it multiple times.

Have fun!!


Jim Priest

Ant rocks! Great example on how to use replacetoken.

I'll add a link on my Ant wiki.

Luis Majano

Thanks Jim,

I actually learned a lot from your wiki!! Thanks!!

Jim Priest

Glad someone's reading it :)

Rob Gonda

You dont waste time!


Take a look at objectBreeze too. It's a very easy ORM to implement in any CF application. I think it's possible to make it available for Coldbox, for example as pluging.

Kind regards


Luis Majano

I have Joeri,

Actually, that is the first ORM I looked at and really liked it too. I think so too. This would be great to great one single ORM plugin that can have adaptors built in for all the ORM's

dizi izle

I actually learned a lot from your wiki!! Thanks!!

Site Updates

Entry Comments


Entries Search