ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Jocham <rjocha...@yahoo.com>
Subject Re: How to set system properties (-D) from a ant task
Date Fri, 10 Oct 2003 19:23:11 GMT
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 <gudnabrsam@yahoo.com> 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 <rjocham72@yahoo.com> 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


Mime
View raw message