Erik Hatcher wrote:

> Split each app servers properties into a separate properties file -
> resin.properties, tomcat.properties. Resin example:
>
> appserver.root=<path to resin root>-${resin.version}
> appserver.webapps=${appserver.root}/webapps
>
> Then -
>
> <property file="${appserver.name}.properties"/>
>
> Alternative 2:
>
> Take advantage of the 'id' attribute on <property>.  Here's an example, not
> worked up in the same vein as Resin/Tomcat, so you'll have to use your
> imagination.  This would get ugly probably as you'd have to duplicate things
> for each property you wanted to "dereference", I think:
>
> <property name="X" value="Y" id="X.prop"/>
> <property name="Y" value="Z" id="Y.prop"/>
> <property name="selector" value="${X}"/>
> <property name="A" refid="${selector}.prop"/>
> <echo message="A = ${A}"/>
>
> Alternative 1 is pretty much the "Ant-way" for doing this kind of thing, and
> the way I recommend.  What disadvantage does that approach have for you in
> the kinds of scenarios you envision?  I'm quite curious to know where
> Alternative 1 breaks down for any use-cases you have in mind.

I think that Alt 1 is the way to go for now because Alt 2 is just not that clear, 
given the amount of code required to
acheive the goal.

I have used the recursive definition of make in the past for doing (get this) an 
object-oriented build system written
entirely in make language.  I was able to have a syntax that allowed polymorphism and 
data hiding (targets were
"methods").  It was pretty far out, but it was useful for simplifying the large builds 
that we were doing at the time.

Having recursively defined variables, coupled with a Struts-like tag library (for 
doing iteration, conditionals etc.) I
believe that ant could achieve even greater power.  I have grown to really love ant 
for its simplicity and (most of all)
speed.

Is there an interest on a Struts-like front-end to ant, so that you can iterate, have 
conditionals, and so forth?  I am
planning on writing one using the template language from my web framework (which 
supports JSP).

BTW Erik, when's your book coming out, man?  I want a copy!!!

- Drew
--
Drew Davidson
(520) 531-1966
(520) 370-5117 (cell)
(520) 531-1965 (fax)
[EMAIL PROTECTED]
http://www.paintyourselfsilly.com
http://www.ognl.org



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to