<echoproperties> </echoproperties> |
</pre> |
</pre>How I Use AntFirst of all make sure that you have Apache Ant installed. It can be downloaded from [Ant Home Page]. Probably easiest to add the Ant/bin directory to your PATH environment variable. I tend to create a new directory for each Robot that I work on & treat each Robot as a separate project. This directory has the following format: RobotNameDir? src - The source code for the Robot. This is the parent directory of my Java package structure. classes - Where the Java classes are created by the compiler. This directory will be automatically created by the Ant script. javadoc - The automatically generated documentation for my Robot's classes. jars - The directory that holds the JAR file for the robot after it has been packaged. * Copy the XML from above and create a file called build.xml (this is the default name used by Ant) in the Robot's root directory. * Edit the build.xml file and set the properties at the top of the file to match the details of your robot and your installation of Robocode. * Create your Java source code * Run Ant from the command line to perform the task that you want to carry out. This should be executed from the Robot's root directory. This is done by selecting the name of the target in the build file that you want to execute. For example: to compile the Bot without creating the JAR file you will need to enter "ant compile" at the command prompt. The Sample Ant Build file contains the following targets:
The build file also includes the inter-dependancies between the tasks. For example, if you specify the 'deployjar' target Ant will compile any classes that need compiling & then build the jar before it is deployed. To DoTrying to create the following Ant tasks: * one that automatically sends updated Bots to the RobocodeRepository * One that executes test battles against selected Bots. A sort of modified version of RoboLeague so that I can test whether the modifications that I have made to the code actually improve the performance. |