ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Dantas Rocha <ad-ro...@uol.com.br>
Subject RES: Set sysproperty under Java task
Date Wed, 27 Oct 2004 14:21:56 GMT
Thanks Dominique! 

-----Mensagem original-----
De: Dominique Devienne [mailto:DDevienne@lgc.com] 
Enviada em: quarta-feira, 27 de outubro de 2004 11:05
Para: Ant Users List
Assunto: RE: Set sysproperty under Java task

> From: André Dantas Rocha [mailto:ad-rocha@uol.com.br] I'm creating my 
> Ant project dynamically and would like to specify a
> sysproperty:
> 
> <sysproperty key="jboss.aop.verbose" value="true" />
> 
> I don't want to use "-D" arg... is it possible?
> There is a piece of my code:
> 
> Java java = (Java) project.createTask("java"); java.init(); 
> java.setClassname("MyClass"); java.setFork(true); 
> java.setClasspath(path);

It's a bit of a pain programmatically. See below. --DD

import org.apache.tools.ant.types.Environment;

Environment.Variable variable = new Environment.Variable();
variable.setKey("jboss.aop.verbose");
variable.setValue("true");

java.addSysproperty(variable);

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message