Let's say that you installed the Sun JDK on your system, and you set the
environment variable JAVA_HOME
to point to that JDK's base
directory.
Let's also say that you installed Ant on your computer, and you set the
environment variable ANT_HOME
to point to the base directory of
the Ant 1.6.2 install.
Now, we need to make sure that our project can retrieve the explicit version
of each dependent library files from our build. Let's go against the
Maven grain by setting up our
lib/
directory like this:
|
|
|
|
[root]/
+- lib/
+- antlion/
+- 0.9.0/
+- antlion-inline-0.9.0.jar
+- log4j/
+- 1.2.8/
+- log4j-1.2.8.jar
+- xerces/
+- 2.6.2/
+- xmlParserAPIs.jar
+- xercesImpl.jar
+- junit/
+- 3.8.1/
+- junit.jar
|
|
|
|
|
So that in each directory, we can store the binary files along with their
license and notice files. If we were so inclined, we could also add the
JavaDoc and even Java source here, to that developers could more easily
use those libraries. For build purposes, though, all we need to know about
are the binary library files.
Since we plan on using the JUnit Ant task, we must make sure that, when we
invoke Ant, Ant knows about the JUnit jar file. To do this, we also add
the environment variable LOCALCLASSPATH
to point to our
project's JUnit library file (or, if you want, at some other location).