Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 69559 invoked from network); 10 Oct 2003 19:23:27 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 10 Oct 2003 19:23:27 -0000 Received: (qmail 97518 invoked by uid 500); 10 Oct 2003 19:23:08 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 97300 invoked by uid 500); 10 Oct 2003 19:23:06 -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 97287 invoked from network); 10 Oct 2003 19:23:06 -0000 Received: from unknown (HELO web10206.mail.yahoo.com) (216.136.130.70) by daedalus.apache.org with SMTP; 10 Oct 2003 19:23:06 -0000 Message-ID: <20031010192311.67319.qmail@web10206.mail.yahoo.com> Received: from [63.125.44.226] by web10206.mail.yahoo.com via HTTP; Fri, 10 Oct 2003 12:23:11 PDT Date: Fri, 10 Oct 2003 12:23:11 -0700 (PDT) From: Ralph Jocham Subject: Re: How to set system properties (-D) from a ant task To: Ant Users List In-Reply-To: <20031010185512.35736.qmail@web20422.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 This is my jcsc.bat file java -Xmx64m -cp %CP_JCSC% -Djcsc.home=%JCSC_HOME% -Dlog4j.configuration=jcsc.log4j rj.tools.jcsc.JavaCodingStandardChecker %1 %2 %3 %4 %5 %6 %7 %8 %9 which launches jcsc. Jcsc also has a Ant task but since I do not pass in the log4j.configuration I get the following Ant output: $ ant jcsc [...] Buildfile: build.xml log4j:WARN No appenders could be found for logger (rj.tools.jcsc.ui.RulesDialog). log4j:WARN Please initialize the log4j system properly. jcsc: [delete] Deleting 232 files from I changed the ant script to include that log4j property but still no success. "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dlog4j.configuration=jcsc.log4 -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@" What am I missing??? Thanks, Ralph --- Matt Benson wrote: > I don't know if I understand what you want to do. > You > want your Task to set a Project property? A System > property? As I understand it, the -D stuff is > passed > to the JVM to be used as a system property, then Ant > copies all system properties into the project. > > -Matt > > --- Ralph Jocham wrote: > > Hi, > > I am facing the following problem. My program uses > > log4j and when the program is launched using a .sh > > or > > .bat file I pass in the log4j config file with > > > > -Dlog4j.configuration=jcsc.log4j > > > > which works fine. However, my application > > (http://jcsc.sourceforge.net) also provides a Ant > > task. How can I pass in a -D property from my ant > > task. I do not want to create a new attribute for > my > > JCSC task. The Ant documentation didn't help. > > > > Any help or advise is appreciated. > > > > Thanks, > > Ralph > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product > > search > > http://shopping.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > user-unsubscribe@ant.apache.org > > For additional commands, e-mail: > > user-help@ant.apache.org > > > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product > search > http://shopping.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org