How do I make ANT verbose?

JavaAntIntellij Idea

Java Problem Overview


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>

Java Solutions


Solution 1 - Java

To enable verbose output for ant:

ant -v

or

ant -verbose

Solution 2 - Java

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! :)

Solution 3 - Java

There are also possibilities for subtler logging, means changing the noiselevel for specific parts only, not for the whole ant script as ant -v or ant -debug does. See https://stackoverflow.com/q/5462732/130683 for another question dealing with loglevel and answers.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsproketboyView Question on Stackoverflow
Solution 1 - JavasamlewisView Answer on Stackoverflow
Solution 2 - JavaGustavo CoelhoView Answer on Stackoverflow
Solution 3 - JavaRebseView Answer on Stackoverflow