Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 18133 invoked from network); 9 Jun 2002 08:51:00 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Jun 2002 08:51:00 -0000 Received: (qmail 4593 invoked by uid 97); 9 Jun 2002 08:51:11 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 4563 invoked by uid 97); 9 Jun 2002 08:51:10 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 4548 invoked by uid 97); 9 Jun 2002 08:51:09 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 9 Jun 2002 08:50:52 -0000 Message-ID: <20020609085052.24487.qmail@icarus.apache.org> From: conor@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N conor 2002/06/09 01:50:52 Modified: src/main/org/apache/tools/ant Tag: ANT_15_BRANCH Main.java Log: Use log methods rather than System.out in Main Revision Changes Path No revision No revision 1.65.2.3 +14 -12 jakarta-ant/src/main/org/apache/tools/ant/Main.java Index: Main.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v retrieving revision 1.65.2.2 retrieving revision 1.65.2.3 diff -u -w -u -r1.65.2.2 -r1.65.2.3 --- Main.java 6 Jun 2002 06:28:34 -0000 1.65.2.2 +++ Main.java 9 Jun 2002 08:50:52 -0000 1.65.2.3 @@ -809,7 +809,7 @@ */ private static void printDescription(Project project) { if (project.getDescription() != null) { - System.out.println(project.getDescription()); + project.log(project.getDescription()); } } @@ -853,20 +853,21 @@ } } - printTargets(topNames, topDescriptions, "Main targets:", maxLength); + printTargets(project, topNames, topDescriptions, "Main targets:", + maxLength); //if there were no main targets, we list all subtargets //as it means nothing has a description if(topNames.size()==0) { printSubTargets=true; } if (printSubTargets) { - printTargets(subNames, null, "Subtargets:", 0); + printTargets(project, subNames, null, "Subtargets:", 0); } String defaultTarget = project.getDefaultTarget(); if (defaultTarget != null && !"".equals(defaultTarget)) { // shouldn't need to check but... - System.out.println("Default target: " + defaultTarget); + project.log("Default target: " + defaultTarget); } } @@ -908,8 +909,9 @@ * position so they line up (so long as the names really * are shorter than this). */ - private static void printTargets(Vector names, Vector descriptions, - String heading, int maxlen) { + private static void printTargets(Project project,Vector names, + Vector descriptions,String heading, + int maxlen) { // now, start printing the targets and their descriptions String lSep = System.getProperty("line.separator"); // got a bit annoyed that I couldn't find a pad function @@ -928,6 +930,6 @@ } msg.append(lSep); } - System.out.println(msg.toString()); + project.log(msg.toString()); } } -- To unsubscribe, e-mail: For additional commands, e-mail: