Summary: | Make sysproperty a top level element to set system properties of ant | ||
---|---|---|---|
Product: | Ant | Reporter: | Oliver Meyer <omeyer> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P4 | ||
Version: | 1.6.5 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Oliver Meyer
2006-05-11 09:01:35 UTC
For the particular problem of proxy setup (and it is a problem, especially on roaming laptops), what is wrong with the <setproxy> task? The only problem with <setproxy> is that I did not look for something like that :-) Thanks, it solved my problem, so I'm reducing priority for this enhancement. It still sounds like a good idea to me, though, so the enhancement is still open. We have found a need for something similar, to configure the XML parser that underlies an operation for which we use the <xslt> task. We have a pretty trivial ant task implementation that allows us to invoke: <setSystemProperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" value="org.apache.xerces.parsers.XIncludeParserConfiguration" /> prior to XSLT, and this then allows us to convert docbook (with xincludes) to HTML using ant's xslt task. No doubt there are other inventive uses for being able to set system properties, so we'd like to add a +1 to having this as a standard feature in ant. For the record, or for anyone else that wants something similar, our task is implemented as: /** A simple Ant task to set a System property. */ public class SetProp extends Task { private String _key = null; private String _value = null; public void execute() throws BuildException { System.setProperty(_key, _value); } public void setKey(final String key) { _key = key; } public void setValue(final String value) { _value = value; } } |