[ng-dhtml] ant frustrations

Mark D. Anderson mda at discerning.com
Wed Sep 29 19:28:04 CDT 2004


i don't even try to get Ant to do things in-process anymore, because
i always get screwed by some impenetrable problem with classpath,
or jvm args, or xml libraries, or class loader security, or
threads, or ...

so i end up with things like:

     <property name="jvm.options" value="-Xmx512m"/>
     ...

     <java classname="org.kp.anuhak.velocity.SyntaxCheck" fork="yes"
     failonerror="yes">
       <env key="PATH" path="${java.library.path};${jvm.path}"/>
        ...
       <jvmarg value="${jvm.options}"/>
       ...
       <classpath>
          <pathelement path="${build.classes}"/>
           ...

Of course, you have to repeat that nonsense everywhere, because ant
has such poor abstraction mechanisms.
And you have to suffer from its piss-poor handling of external
processes (backgrounding, exit codes, stderr, harvesting children,
etc.).
And you have a big performance hit, because java takes so long
to get its lumbering ass out of bed.

But at least then you can run arbitrary programs that use java.
Which I guess is good.

-mda

p.s.: Maybe I'd feel better about the above if I could call it a
"pattern".
You know, like the "why can't i do this simple thing" pattern.
It is certainly inversion of control -- I've lost all control, and Ant
has all of it....

p.p.s.: I like the tone of the http://hates-software.com/ sites. 
Maybe it is finally time for me to set up my own. As long as
nobody calls it a blog....




More information about the NG-DHTML mailing list