Troubleshooting Ant

Ant giving you problems? Here are a few things to check*:

Things To Check

  • Which version of ant are you running? Other applications distribute a copy -it may be being picked up by accident.
  • If a task is failing to run is optional.jar in ANT_HOME/lib? Are there any libraries which it depends on missing?
  • If a task doesn't do what you expect, run ant -verbose or ant -debug to see what is happening.
  • Unset CLASSPATH; if that is wrong things go horribly wrong. Ant does not need the CLASSPATH variable defined to anything to work.
  • Make sure there are no versions of crimson.jar or other XML parsers in JRE/ext.

Path / Environment Variables (Windows)

  • Check your environment variables. Are ANT_HOME and JAVA_HOME correct? If they have quotes or trailing slashes, remove them.
    • To set Windows environment variables go to Control Panel > System > Advanced > Environment Variables
    • To view environment variables - go to a DOS prompt and type 'set'. You should get a list of variables. Verify ANT_HOME is there and set to the correct path.
U:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
ANT_HOME=D:\ant
APPDATA=C:\Documents and Settings\priestj\Application Data
APR_ICONV_PATH=C:\Program Files\Subversion\iconv
CommonProgramFiles=C:\Program Files\Common Files
  • To view your path - go to a DOS prompt and type 'path'.
U:\>path
PATH=C:\ColdFusion8\verity\k2\_nti40\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Program Files\Java\jdk1.5.0_11;C:\Program Files\Java\jre1.5.0_11;C:\WINNT\system32;C:\WINNT;C:\Program Files\Subversion\bin...
  • Is your path correct? Is Ant on it? What about JDK/bin? have you tested this? A createProcess error (especially with ID=2 on windows) usually means executable not found on the path.

:!: Bits of this were taken from the Ant Feedback and Troubleshooting page.

/home3/thecrumb/public_html/wiki/data/pages/ant/troubleshooting_ant.txt · Last modified: 2008/09/04 07:33 by thecrumb
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki