2012-04-07 30 views
33

試圖在構思10中用ANT構建我的項目,並且出現編譯錯誤,但我沒有看到實際的錯誤。如何讓ANT冗長?

我該如何讓ANT冗長?

我看到的是:

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 

我的任務是這樣的:

<javac includeantruntime="false" destdir="${webapp.classes.dir}" debug="true"> 
    <src path="${src.dir}"/> 
    <classpath refid="project.classpath"/> 
</javac> 
+0

[也許依賴JAR丟失?](http://stackoverflow.com/questions/8667798/compile-failed-see-the-the-compiler-error-output-for-details) – nobeh 2012-04-07 10:14:59

回答

48

要啓用詳細輸出螞蟻:

ant -v 

ant -verbose 
1

也有可能存在微妙的日誌記錄,意味着只改變特定部分的noiselevel,而不是ant -v或ant-debug所做的整個ant腳本。有關處理日誌級別和答案的另一個問題,請參閱Make ant quiet without the -q flag?

10

您還可以使用任務記錄啓用在build.xml本身上的日誌記錄。下面是關於它的http://ant.apache.org/manual/Tasks/recorder.html

<record name="/output/build.log" loglevel="verbose" action="start"/> 

It's簡單和工程文件! :)

+1

注意:如果你得到錯誤「使用記錄器條目打開文件時出現問題」,這可能意味着您試圖保存日誌文件的文件夾尚不存在。 – 2014-02-03 18:00:20