Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 75909 invoked from network); 6 Mar 2002 14:37:49 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Mar 2002 14:37:49 -0000 Received: (qmail 18465 invoked by uid 97); 6 Mar 2002 14:37:23 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 18400 invoked by uid 97); 6 Mar 2002 14:37:23 -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 18326 invoked from network); 6 Mar 2002 14:37:22 -0000 Message-ID: <3C862974.62424268@i2.com> Date: Wed, 06 Mar 2002 08:36:36 -0600 From: Ken Wood X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Ant Developers List Subject: Probably dumb question about accessing system properties in build listeners. References: <20020305142710.15264.qmail@icarus.apache.org> <3C84D88F.6020109@cortexebusiness.com.au> <006d01c1c454$4c6e2b70$270610ac@manu.com> X-MIMETrack: Itemize by SMTP Server on i2Hub4/Servers/i2Tech(Release 5.0.8 |June 18, 2001) at 03/06/2002 08:37:15 AM, Serialize by Router on i2Hub4/Servers/i2Tech(Release 5.0.8 |June 18, 2001) at 03/06/2002 08:37:21 AM, Serialize complete at 03/06/2002 08:37:21 AM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I wrote a simple build listener, and I initially designed it to be configured from a file. Now, I want it to be configured from system properties on the command line. So, I changed the code that reads the property files to instead us java.lang.System.getProperty()... When I invoke Ant, I used the -Dproperty=value syntax. Well, when I test the listener, the properties are not there! I suspect Ant is grabbing them because I see that Project has getProperty methods. Problem is, I can't see a way to get a handle on the project object in a build listener. Everything else I looked at that references a project object is extended from Project in one way or another, so the access is easy. Am I missing something? Is there some way for a build listener to get the 'project' object so it can get the properties? Any advice on how I should do this? Or, should System.getProperty work??? Thanks! -ken -- To unsubscribe, e-mail: For additional commands, e-mail: