Is there a way to use an environment variable for the URI in the !ENTITY?
I'm using multiple build.xml files in various sub-directories.
It would be easier to add new packages to the project without having to
worry
if the relative pathing was correct.
I tried the obvious (and naive) $MYFILE, but no luck.
Is there a way in XML to tell the parser to substitute an environment
variable?
Thanks,
Eric
Mark Hewitt <[EMAIL PROTECTED]> wrote:
I have per-project and shared xml files to achieve this.
The project build.xml has pieces like this:
...
<!-- Include standard entities
-->
<!DOCTYPE project [
<!ENTITY commonProperties SYSTEM "../admin/common.xml">
<!ENTITY projectProperties SYSTEM "project.xml">
<!ENTITY commonTargets SYSTEM "../admin/targets.xml">
]>
<!-- Start of project build description
-->
<project name="XXX" default="compile" basedir=".">
...
<!-- ======================================================================
-->
<!-- Import all the common build targets
-->
<!-- ======================================================================
-->
&commonTargets;
<!-- ======================================================================
-->
<!-- inclusion : Import all the common and project-specific properties
-->
<!-- ======================================================================
-->
<target name="inclusion">
&commonProperties;
&projectProperties;
</target>
Which all works nicely for me!
#!/mjh
-----Original Message-----
From: Danil Suits [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 20:30
To: '[EMAIL PROTECTED]'
Subject: Build.xml and reuse
Has anyone experimented with reusing the targets within the build.xml file?
I frequently find myself wanting to work on only a subsystem of the project.
I could add a new target to the build.xml file - but that publishes my local
work to every developers machine, which isn't appropriate in this case.
What I'm currently considering is moving the contents of the project to a
new file (common.xml), replacing them in build.xml with an XML include, then
creating mybuild.xml which includes common.xml, plus whatever other changes
I need. build.xml remains under source control, as does common.xml, but
mybuild.xml is not under control.
I'm sure this will work, and I'm also sure that it is kind of clumsy - has
anybody discovered a better way to achieve target reuse?
Thanks,
Danil
Eric Rosengren
Aether Systems (RTS Wireless)
[EMAIL PROTECTED]
516-918-4664