You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dominique Devienne <DD...@lgc.com> on 2004/01/21 03:21:10 UTC

RE: order of 's and , and usage of entity references

> From: Ray Tayek [mailto:rtayek@freightgate.com]
> 
> hi, trying to develop a set of ant scripts for use as starting points in a
> small .com that makes web apps (mostly servlets and now a little web
> services). mostly getting ant and junit to play nice in netbeans and (and
> in
> eclipse rsn). i came up with the following order (based on maximum ability
> to override stuff:
> 	<property environment="env"/>
> 	<property file="${user.home}/build.properties"/>
> 	<property file="build.properties"/>

That's exactly what I'm doing too. Meaning that user properties have
Higher priority that project properties, and both can reference env.
Var. using the ${env.NAME} notation.

> then i noticed the sample build.xml in tomcat 5:
> 	<property file="build.properties"/>
> 	<property file="${user.home}/build.properties"/>
> 	<property environment="env"/>

Means users can't override project properties, except directly
On the command line, and that neither project or user properties
Can reference env. vars... This is wrong to me.

> also, it seems that a lot of stuff in build files is boiler plate (i know
> i
> can use refids's). iirc, there were some older threads on using xml entity
> references like:
> 
> <?xml version="1.0"?>
> <!DOCTYPE project [
> 	<!ENTITY foo SYSTEM "../foo.xml">
> ]>
> ...
> <project ...
> ...
> ... &foo; ...
> ...
> </project>
> 
> searched the arhives, but did not find much. does this stuff work? are
> there
> any weirdities to worry about? Is there some doc somewhere?
> 
> any pointers will be appreciated.

Just use Ant 1.6 (1.6.1 is coming out soon) with an <import> that superceded
XML entity import. <import> further allows you to override a target from the
Imported build file. --DD

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