ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Adams" <DAd...@ignitesports.com>
Subject spanning XML files outside of XML declaration
Date Fri, 08 Nov 2002 23:26:29 GMT
I am looking for a method to expand a properties.xml file into a build file with out using
the XML !ENTITY function. The build system I am developing will be building numerous projects.
I do not want to have to location the properties.xml file in a precise location. 

Example:
Previously, I was using: 
<!DOCTYPE project [
	<!ENTITY properties SYSTEM "properties.xml">
]>
<project name="sportsbean" default="main" basedir=".">
	<property name="project.name" value="bean"/>
	<property name="project.version" value="v5.1"/>
	&properties;
</project>
This very nicely expanded the XML file into the project tag, allowing the project.name and
project.version properties to fill in values in the properties.xml elements as if the elements
in properties.xml were a native piece of the build file. 

However, now I do not want to have to force the developer to have the properties.xml file
in a certain location. I want to give the developer the freedom to place the properties file
in the ANT.HOME directory. Though this is a particular directory, it is required on a machine
that builds with Ant. I want to reference the properties file in the same way as in XML, but
XML does not know about environment properties. 
What I want to do is something like this:
<properties xmlfile="properties.xml"/>
with the expectation that the file will be expanded into the build.xml as if the elements
were native. 

Reasons I want to do this:
1. I do not want a developer mutiny when forcing a build environment. Though that may have
to be my tactic.
2. I do not want to call the xml file from another, central machine. I had thoughts of doing
the following:
<!DOCTYPE project [
	<!ENTITY properties SYSTEM "http://build.server.com/properties.xml">
]>
3. I want to put other properties such as filtersets and filesets into the properties.xml
file. 
4. I want to be able to let build.xml files establish local properties that are then used
in the expanded properties.xml.

Am I crazy for wanting to do this with these restrictions? Is there a better way to do this?
Does this make sense?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David Adams
Ignite Sports (www.ignitesports.com)
Voice: 773.293.4300
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message