ant build file for datascript
Status: Pre-Alpha
Brought to you by:
gback
Hi!
Just started trying out datascript. Before trying to
build a Java
project, I always create an build.xml description for
Apache
ant, if there is no one there :-))
If you copy the atached file to the main directory of
datascript
and have ant installed, then you can build it by executing
ant
in the main directory, or
ant examples.classfile
for building the classfile example. Since datascript
uses JTB and
javacc, ant tells you what to do next, if your
environment is not
set up correctly.
Best regards, Bernhard.
Logged In: YES
user_id=587090
Thank you.
I tried ant.
First it complains that JAVA_HOME isn't set, even though I
have "java" in my path.
When I set JAVA_HOME, it says:
BUILD FAILED
file:/dryer/engler/gback/ds/build.xml:39: Java Tree builder
not found. Make sure EDU.purdue.jtb.JTB is in your class path.
Total time: 1 second
even though I have "jtb" in my path.
I'd like to include support for ant, but shouldn't ant be at
least as smart as make when it comes to finding tools?
I'll check this file in, but it would be great if you could
fix it so that it runs "out of the box".
If you want to be included in the developers group, let me know.
- Godmar
Logged In: YES
user_id=29238
Hi Godmar,
ant requires JAVA_HOME to be set. I think, it needs to find
additional resources from the installation, not just the
executable.
Ant is a Java-centric build tool. The build process, invokes
several classes including the Java compiler without spawning
a new Java virtual machine over and over again. Since JTB
itself does not provide support for ant (by providing a
customized ant task), I decided to directly invoke the JTB
main class, not the JTB wrapper script. Therefore, you have
to include the jtb.jar in your CLASSPATH before invoking ant.
One could also execute the jtb wrapper script from ant, but
then there is no chance to avoid spawning an additional
virtual machine. Of cause, then it is sufficient to have jtb
in the path.
To make the build process run out of the box, one could
include all necessary jars in a lib/ subdirectory and use
these. JavaCC is a similar problem, because it also requires
a property javacc.home to be set.
Best regards, Bernhard.
Logged In: YES
user_id=29238
The attached patch fixes some dependency problems in
build.xml and adds build description for the new DVI example.
Logged In: YES
user_id=587090
thanks, patch applied