If like me, you use Ant to deploy builds, etc, and you have migrated to Windows 7 – you may well have troubles getting ant to run.

It all worked flawlessly under Ubuntu, but Windows is a different beast – here’s a step by step guide to getting it working.

1) Install ant

So, first you need ant. This needs extracting somewhere (but remember where… for step 5) You can download ant from here.

2) Install PHPUnit

PHPUnit is best installed through PEAR.

You need to tell PEAR where to get PHPUnit from:

pear channel-discover pear.phpunit.de

And then actually get it:

pear install phpunit/phpunit

3) Install an SVN Client

I nominated to install sliksvn – from here – this svn client is a brilliant piece of software with all the standard commands. Remember where you install this to.

4) Install Java

Install the latest Java development toolkit (Java JDK) from here

NB. Remember where you install it to, as you’ll need the path in the next step.

5) Setup Windows Paths

Holding the Windows key, press Pause/Break (usually the top right key on your keyboard) – This will bring up the system control panel. Click on “Advanced system settings” (on the left)

The system properties dialog appears, click on the Environment Variables button.

In the bottom grid (System Variables), find Path – and double click on it. A small (unhelpfully small) dialog will appear with a load of paths in. Scroll to the end, and enter the paths to the following pieces of software:

  1. Sliksvn – the bin folder (i.e. c:program filessliksvnbin)
  2. PHP folder (i.e. c:xamppphp)
  3. Ant – the bin folder (i.e. c:antbin)
  4. The path to your java.exe executable (i.e. C:Program Files (x86)Javajdk1.6.0_14bin)

Note: All these paths need separating with a semi-colon, for example:

c:program filessliksvnbin;c:xamppphp;c:antbin;c:program files (x86)javajdk1.6.0_14bin

Remember that each path has to be separated with a semi-colon

And thats that. It should work lovely.

However, when you run ant, PHPUnit will run very slowly. Not sure what it is yet, but I will update once I’ve discovered the problem.

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.