由于使用ant时可能出错,而屏幕不够大的话,可能看不清,最好将编译出错信息放入一个文件中,如下这样使用ant: ant -buildfile build.xml -logfile error.log 就会将出错信息放入error.log中,由于使用buildfile参数,因此xml文件名不一定时build.xml,可以为任意xml 文件,如project.xml

解决方案 »

  1.   

    谢谢你一般情况下,使用-logfile参数,输出的是全部编译信息包括正确的,错误的,还有警告的。
    而我只需要错误和警告的信息。
      

  2.   

    下载ANT源代码,自己进行修改好了:)
      

  3.   

    命令行可选参数摘要: ant [options] [target [target2 [target3] ...]]
    Options:
    -help                  print this message
    -projecthelp           print project help information
    -version               print the version information and exit
    -quiet                 be extra quiet
    -verbose               be extra verbose
    -debug                 print debugging information
    -emacs                 produce logging information without adornments
    -logfile file          use given file for log output
    -logger classname      the class that is to perform logging
    -listener classname    add an instance of class as a project listener
    -buildfile file        use specified buildfile
    -find file             search for buildfile towards the root of the filesystem and 
    use the first one found
    -Dproperty=value       set property to value
      

  4.   

    http://developer.ccidnet.com/pub/disp/Article?columnID=322&articleID=27619&pageNO=1
      

  5.   

    javac 中nowarn="off" debug="off"