Using the Eclipse Ant View

Using the Eclipse Ant View


View the CFUnit-Ant help document for instructions on creating an Ant build file with CFUnit tests.
When viewing my build.xml file within the Ant View I was getting an error of 'taskdef class net.sourceforge.cfunit.ant.CFUnit cannot be found'.

Which was odd as I could get builds to work everytime I saved a file which was specified as a resource.

To open an Ant view with cfeclipse go to the menu and click on window > show view > other... > ant

Drag your build.xml file into the Ant pane, and try running a test by right clicking one of the targets and choose Run As > Ant Build

Alternatively you can open a build file within the Ant view by clicking the Ant icon with a green plus sign above.

If you get an error of 'taskdef class net.sourceforge.cfunit.ant.CFUnit cannot be found' follow these steps:

  1. With cfeclipse go to the top menu and click on Window > Preferences.
  2. Within prefrences there should be a folder tree on the left. Click on Ant > Runtime
  3. Click the 'Classpath' tab and on the right hand side there should be some buttons. Click 'Add external JARs..' and search for cfunit_aunt.jar And hit 'APPLY' then 'OK'.
Try running a build within the Ant view, and the error should go away.

Submitted by an anonymous user