sproketboy
sproketboy

Reputation: 9452

How do I make ANT verbose?

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>

Upvotes: 64

Views: 77044

Answers (5)

tobi delbruck
tobi delbruck

Reputation: 323

In Netbeans 20, you can set the verbosity level in the GUI

setting ant verbosity

Upvotes: 1

dmatej
dmatej

Reputation: 1596

You can also use the environment variable ANT_ARGS:

export ANT_ARGS="-verbose"

That applies even to ant builds executed via bash scripts.

Upvotes: 2

Gustavo Coelho
Gustavo Coelho

Reputation: 1010

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

Upvotes: 25

Rebse
Rebse

Reputation: 10377

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 Make ant quiet without the -q flag? for another question dealing with loglevel and answers.

Upvotes: 2

samlewis
samlewis

Reputation: 4048

To enable verbose output for ant:

ant -v

or

ant -verbose

Upvotes: 91

Related Questions