Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 27695 invoked from network); 11 Feb 2004 21:04:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 11 Feb 2004 21:04:37 -0000 Received: (qmail 76408 invoked by uid 500); 11 Feb 2004 21:04:11 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 76359 invoked by uid 500); 11 Feb 2004 21:04:10 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 76328 invoked from network); 11 Feb 2004 21:04:10 -0000 Received: from unknown (HELO besec550.swift.com) (195.99.94.5) by daedalus.apache.org with SMTP; 11 Feb 2004 21:04:10 -0000 Received: by besec550.swift.com with ESMTP id i1BL2L2G013216 for ; Wed, 11 Feb 2004 21:02:22 GMT Date: Wed, 11 Feb 2004 22:04:00 +0100 From: RADEMAKERS Tanguy Subject: Re: How to redirect javac task errors to a separate file In-reply-to: To: Ant Users List Message-id: <402A98C0.9010305@swift.com> Organization: S.W.I.F.T. sc MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 References: X-MASF: 0.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N use around the task. /t Digambar, Shaligram (Consultant) wrote: >I need to redirect ant javac tasks error output to a separate file. >Currently all javac messages are logged in the output. I need to log only >the compiler error message (shown in bold and marked 'M"below) to a separate >file so that developers in a team can easily identify and fix the errors. >With the javac executable there was easy way to redirect output into >separate file e.g. $javac testMe.java 2> error.txt or $javac testMe.java 1> >warning.txt. I don't see any such feature in ant. > >Here is the sample javac task output: > [javac] Since fork is true, ignoring compiler setting. > [javac] Compiling 1 source file to C:\build > [javac] depend attribute is not supported by the modern compiler > [javac] Since fork is true, ignoring compiler setting. > [javac] [parsing started C:\build\testMe.java] > [javac] [parsing completed 312ms] > M[javac] C:\build\testMe.java:3: class test is public, should be >declared in a file named test.java > M[javac] public class test > M[javac] ^ > [javac] [loading C:\jdk1.3.1_10\jre\lib\rt.jar(java/lang/Object.class)] > [javac] [loading C:\jdk1.3.1_10\jre\lib\rt.jar(java/lang/String.class)] > [javac] [loading C:\jdk1.3.1_10\jre\lib\rt.jar(java/util/Vector.class)] > [javac] [loading C:\jdk1.3.1_10\jre\lib\rt.jar(java/lang/Thread.class)] > >Please let me know if it is possible to implement this in ant. > >Thanks, >Shaligram > > > > >----------------------------------------- >This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org