From user-return-39073-apmail-ant-user-archive=ant.apache.org@ant.apache.org Tue Dec 02 17:07:18 2003 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 58214 invoked from network); 2 Dec 2003 17:07:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Dec 2003 17:07:18 -0000 Received: (qmail 65216 invoked by uid 500); 2 Dec 2003 17:06:55 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 65182 invoked by uid 500); 2 Dec 2003 17:06:55 -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 65126 invoked from network); 2 Dec 2003 17:06:55 -0000 Received: from unknown (HELO mailbo.westgroup.com) (167.68.0.71) by daedalus.apache.org with SMTP; 2 Dec 2003 17:06:55 -0000 Received: from morley.int.westgroup.com (localhost.localdomain [127.0.0.1]) by mailbo.westgroup.com (8.12.10/8.12.10) with ESMTP id hB2H6kUq023154 for ; Tue, 2 Dec 2003 11:06:47 -0600 Received: from eg-msgimc-b10.int.westgroup.com (eg-msgimc-b10.int.westgroup.com [163.231.96.24]) by morley.int.westgroup.com (8.12.10/8.12.10) with ESMTP id hB2H5VnC022360 for ; Tue, 2 Dec 2003 11:06:36 -0600 Received: by eg-msgimc-b10.int.westgroup.com with Internet Mail Service (5.5.2657.72) id ; Tue, 2 Dec 2003 11:05:29 -0600 Message-ID: From: "Dubois, Jeff" To: "'user@ant.apache.org'" Subject: Ant not passing System values to JUnit task Date: Tue, 2 Dec 2003 11:05:25 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C3B8F6.7AA6F5F6" 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 ------_=_NextPart_000_01C3B8F6.7AA6F5F6 Content-Type: text/plain; charset="iso-8859-1" When doing an Ant build of my project (see attached myBuild.xml script) It appears that ant is not passing System variables/values when executing the JUnit task. I am on Windows using Ant 1.5.3. For my JUnit test cases to succeed I need a VM/System variable called "active.level" set to "dev".. When executing Ant (via a batch file) I pass in the value of "active.level" via a "-Dactive.level=dev" argument on the command line. In my ant script I echo out the value of "active.level" and indeed it is set to "dev" (see runUnitTest target in attached script). However, when I run the Unit test, this "active.level" variable is no longer set. I verified this by printing out the value of "active.level" in one of the Java test cases that get run. The code I use is: System.out.println( "active.level is: " + System.getProperty("active.level")); The corresponding output when run through ant is: [junit] active.level is: null By default are not all System variables supposed to be passed to the JUnit task? Thanks! Jeff <> ------_=_NextPart_000_01C3B8F6.7AA6F5F6 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ------_=_NextPart_000_01C3B8F6.7AA6F5F6--