How do I make ANT verbose?

2022-08-31 17:50:26

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>

答案 1

To enable verbose output for ant:

ant -v

or

ant -verbose

答案 2

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


推荐