ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11321] - XmlProperty task doesn't resolve system properties
Date Tue, 15 Oct 2002 17:04:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11321>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11321

XmlProperty task doesn't resolve system properties





------- Additional Comments From paul@priorartisans.com  2002-10-15 17:04 -------
I've written a version of XmlProperty that adds 3 pieces of functionality to the
existing XmlProperty:

1. Resolve properties with the ${..} syntax, as you describe here.
2. Optionally, recognize some attributes in the xml file as "special", and treat
them differently:
  + location: treat the property as a location property rather than a value
  + id: Assign the id to the property, allowing it to be refid'd in other places
  + refid: Refer to the specified property by id
3. Allow specification of classpaths in a properties file. 

2 and 3 above are enabled by a new attribute, "semanticAttributes" specified
with the xml property tag.

So, an example properties file could look like:
<properties>
  <build location="build">
    <classes location="${build}/classes"/>
    <test>
      <classes location="${build}/testclasses"/>
    </test>
  </build>
  <classpaths>
    <path pathid="project.classpath">
      <pathelement path="${java.class.path}"/>
      <pathelement location="${build.classes}"/>
    </path>
    <path pathid="test.classpath">
      <pathelement refid="project.classpath"/>
      <pathelement location="${build.test.classes}"/>
    </path>
  </classpaths>
</properties>

I'm attaching a WinZip file that contains a build file, the modified XmlProperty
and an XmlPropertyTest that reads some provided input xml files and compares the
results against some expected .properties files.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message