http://ant.apache.org/
$PTII/vendors, but Ant can be installed anywhere
Under bash:
export ANT_HOME=$PTII/vendors/apache-ant-1.8.2
export PATH=${PATH}:${ANT_HOME}/bin
You may also need to set JAVA_HOME to the location of your
Java installation.
Under Linux: Use which java to find the directory
that contains the Java Development Kit (JDK):
-bash-3.2$ which java /usr/bin/java -bash-3.2$ ls -l /usr/bin/java lrwxrwxrwx 1 root root 26 Jul 31 10:12 /usr/bin/java -> /usr/java/default/bin/java -bash-3.2$ export JAVA_HOME=/usr/java/default
Under Windows with Cygwin: If which java returns
/cygdrive/c/Program Files/Java/jdk1.7.0/bin/javaTo temporarily set your path, use:
export JAVA_HOME=c:/Program\ Files/Java/jdk1.7.0
%ANT_HOME%/bin;
ANT_HOME
%PTII%/vendors/apache-ant-1.8.1
JAVA_HOME
c:/Program Files/Java/jdk1.7.0
PATH
%ANT_HOME%/bin
ant -hYou should see a help message
build.default.xml
build.default.xmlptII/build.default.xml file is set up for a vanilla installation,
it excludes third party packages like Java3D and Matlab.
To use build.default.xml, merely copy it to build.xml
cd $PTII cp build.default.xml build.xml
$PTII/configure script searches the local machine for
third party packages and sets up Ant, Eclipse, and make appropriately.
Under Windows, you must have Cygwin installed to run configure
To use configure:
cd $PTII ./configureSee Ptolemy II Installation for details
cd $PTII antThis command will read
$PTII/build.xml and build Ptolemy II.
ant -p
ant run
ant javadoc
ant test runs the JUnit tests located in the test/junit
directories. Each directory contains JUnitTclTest.java
that
imports ptolemy/util/test/junit/JUnitTclTestBase.java.
The JUnitTclTestBase.java file uses annotations to
declare what tests should be run. For the auto tests that run models
in test/auto/, we use JUnitParams from
http://code.google.com/p/junitparams/
to parameterize the tests so that the model name appears in the JUnit log.
test/ directorytest/ directory. To hack this in, we tell ant
to use ptolemy/util/test/junit/javachdir as the jvm for
the JUnit tests. The javachdir script reads in the
ant-specific JUnit command line arguments, determines which directory
should be used and cds to that directory.
The problem is that this does not work when we run the JUnit tests from Eclipse.
The solution is to fix the auto/* and *.tcl
tests to be able to be run from any directory.