[stringtemplate-interest] Building ST 4

Barrie Treloar baerrach at gmail.com
Wed Apr 13 21:37:22 PDT 2011


A couple of questions.

1) build.properties

Is there a reason why the instructions do not say to copy
antlr-3.3-complete.jar and ant-antlr3.jar into ant.library.dir?
This makes it easier to run ant as you don't need to muck about with
classpath stuff.
I can understand if you are on a multi-user machine that has a central
installation of ant, but these can still be dropped in via due
process.

This makes the build.properties lines simpler (and a little more cross platform)
i.e.:
antlr3.jar=${ant.library.dir}/antlr-3.3-complete.jar
ant-antlr3.jar=${ant.library.dir}/ant-antlr3.jar


2) build.xml

The compile target specified Java 1.5:

    <javac destdir="${build.dir}/classes"
           source="1.5"
           target="1.5"
           debug="true"

Yet ST.java is using Java 6 features (Arrays.copyOf), see
http://download.oracle.com/javase/1.5.0/docs/api/java/util/Arrays.html
I think, if you want to stick with Java 1.5, you need to use
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#arraycopy(java.lang.Object,%20int,%20java.lang.Object,%20int,%20int)
Or alternatively use an ArrayList.

Cheers
Barrie


More information about the stringtemplate-interest mailing list