Trying to build my project with ANT in idea 10 and I get a compile error but I don't see the actual error.
How do I make ANT verbose?
All I see is:
javac build.xml:303: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1150) etc.... rest of ANT stack trace
My task looks like this:
<javac includeantruntime="false" destdir="${webapp.classes.dir}" debug="true"> <src path="${src.dir}"/> <classpath refid="project.classpath"/> </javac>
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.
Open the Ant view (Window -> Show view -> Ant). If the build file isn't in the view then you can simply add it. Once added right click on the ant target you want to run and select Debug as -> Ant build. The Debug perspective should open up and the process should stop at your breakpoint where you can step through it.
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.
You need to manually add the words "-verbose" or "-debug" to the ant command line. Sorry for not being more descriptive . When i add an new run/debug configuration and choose "Application " from the menu and then press run , i want to see extended (verbose) build output , i never generated an ant build file
There seems to be no verbose property for <target> and <project> and it seems very wrong to call <exec> on ant from inside the script just to pass the verbose prop. Is there a better way? Show activity on this post.
If you've installed Apache Ant as described in the Installing Ant section, running Ant from the command-line is simple: just type ant. When no arguments are specified, Ant looks for a build.xml file in the current directory and, if found, uses that file as the build file and runs the target specified in the default attribute of the <project> tag.
If you use the -find [file] option, Ant will search for a build file first in the current directory, then in the parent directory, and so on, until either a build file is found or the root of the filesystem has been reached. By default, it will look for a build file called build.xml.
To enable verbose output for ant:
ant -v
or
ant -verbose
You can also enable logging on build.xml itself using task record. Here is documentation about it http://ant.apache.org/manual/Tasks/recorder.html
<record name="/output/build.log" loglevel="verbose" action="start"/>
It´s simple and works! :)
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