Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant build scripts totally hangs, with no messages in console

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?

  • JDK 1.6.0_14
  • Eclipse 3.5.1

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.

like image 416
xchg.ca Avatar asked Mar 16 '10 20:03

xchg.ca


People also ask

How do I run Ant build in terminal?

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.

How do you debug an Ant build?

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.

How do you run Ant in verbose mode?

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.

What is build xml in Ant?

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.


1 Answers

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.

like image 120
xchg.ca Avatar answered Oct 07 '22 03:10

xchg.ca