On Jan 7, 2004, at 7:42 PM, Thomas Hicks wrote:
I have to agree with Drew a bit here. I also use ANT everyday and it's
invaluable but, if we had to imagine starting over, I'd like to see
the specification file be more like a programmable language,

I think you and Drew disagree quite a bit, rather than agree.


I agree that Ant is a weird mix of declarative versus some slight programatic stuff, with XML/properties/datatypes in there to confuse things up. Sure, there is lots of room for improvement and I'm not going to defend Ant to the death or anything.

I'm also frequently confused by the schism between the tasks,
the properties, and the "glue syntax" (I don't know what this stuff is called).

that would be "datatypes".


        <path id="rt.classpath">
           <path refid="build.classpath" />
        </path>

        <target name="wontwork">
           <echo message="${rt.classpath}" /> OR
           <echo message="rt.classpath" />
        </target>

<property name="classpath" refid="rt.classpath"/> <echo message="${classpath}"/>

Yes, this is just Ant voodoo, no argument there. But, since you are dealing with a *path* here, looking in the documentation and seeing <pathconvert> would stick out to me, and sure enough, that task will also do what you want.

I assume the failure is because the IDs of <path> "pieces"
are not really properties/variables nor is the <path> "glue" an
object which responds to a 'toString' method. The latter
suggests how things could perhaps be more manipulable.

The <property> 'refid' variant does, in fact, the toString thing. (So doing it against other datatypes like <fileset> is a different story). Properties are java.util.Properties under the covers - properties only have a String value. Datatypes (given an 'id') are more like variables in Java - they have a name and a type.


While we can always find fault with the online free documentation - Ant is (arguably, I suppose) one of the better documented open source projects out there and there are a plethora of articles about it, and of course a few books as well. So while Ant could be a better tool overall, at least it is easy to use, supported everywhere, and info can be had. Heck, just send a mail to your friendly JUG list and look at all the info you get! :))

Erik


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



Reply via email to