I have build.xml for my project, but even this small piece of code
<target name="init">
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
It doesn't run
Console is empty but process is active. I still can terminate it over STOP button
In same time I cannot debug it as well, same stuff active process no output in console and I can wait forever! Any ideas?
Edited: Thank to Peter's Loron question I checked workspace log file MyWorkspace/.metadata/.log There I saw error message I googled it and found that this happening because location of my Eclipse changed, but path to ANT jars remains old. TO Fix that you have to go Preferences->Ant->Runtime and click Restore Default it will pickup new jar location and warn you about absence of tools.jar, copy it from somewhere and drop it in same folder where other ant jars.
To run the ant build file, open up command prompt and navigate to the folder, where the build. xml resides, and then type ant info. You could also type ant instead. Both will work,because info is the default target in the build file.
Ant Debugger enables Apache Ant build script debugging: Open build file in editor. Set debug breakpoints (screenshot 1) Right click on editor to show context menu (screenshot 2) and select the "Debug" menu item to launch Ant debugger.
To run Ant build in debug or verbose mode in command prompt, we can simply use the -d or -debug (for debug mode) and -verbose (for verbose mode). This gives us deep insight into any error we might be facing with the Ant build.
Ant uses an xml file for its configuration. The default file name is build. xml . Ant builds are based on three blocks: tasks, targets and extension points. A task is a unit of work which should be performed and constitutes of small atomic steps, for example compile source code or create Javadoc.
Edited: Thank to Peter's Loron question I checked workspace log file MyWorkspace/.metadata/.log There I saw error message I googled it and found that this happening because location of my Eclipse changed, but path to ANT jars remains old.
TO Fix that you have to go Preferences->Ant->Runtime and click Restore Default it will pickup new jar location and warn you about absence of tools.jar, copy it from somewhere and drop it in same folder where other ant jars.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With