Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 57057 invoked from network); 8 May 2003 13:55:55 -0000 Received: from dnsinet.rzf-nrw.de (193.109.238.66) by daedalus.apache.org with SMTP; 8 May 2003 13:55:55 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.9/8.12.9) with ESMTP id h48DtrZ7000942 for ; Thu, 8 May 2003 15:55:53 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2653.19) id ; Thu, 8 May 2003 15:55:55 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B5608FF690E@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: AW: Question about TaskContainer implementation Date: Thu, 8 May 2003 15:55:55 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C31569.8BD07630" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C31569.8BD07630 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > This question remains: >=20 > || Also when I use the log method from a taskcontainer the=20 > || name of the task doesn't appear in the output (see the=20 > || output) but instead "null". What's causing this? >=20 > || =3D=3D=3D=3D=3D=3D=3D > || OUTPUT: > ||=20 > || test-session: > || [null] executing task > || [null] executing task > ||=20 Task.java implements the log() method with public void log(String msg, int msgLevel) { getProject().log(this, msg, msgLevel); } Maybe the getProject() doesn=B4t give a proper value. Suggestion: - write a task for test: - prints out the project - if that is null insert a setProject() statement before execute(): public void execute() throws BuildException { for (Enumeration enumeration =3D nestedTasks.elements(); enumeration.hasMoreElements();) { log("executing task"); Task task =3D(Task) enumeration.nextElement(); task.setProject( getProject() ); task.execute(); } } Jan ------_=_NextPart_001_01C31569.8BD07630--