AntME logo   AntME title
fill

Installing AntME

Installing AntME is so simple that it's almost embarrassing. All you do is to download the binary file from the Downloads area on SourceForge, and save it into a directory somewhere. Nothing more difficult than that.

Setting up your build file for AntME

In order to use the tasks defined by AntME, you need to introduce Ant to AntME. This is done using Ant's <taskdef> tag.

The simplest way of configuring Ant to understand the AntME tags is to include the following line in your build.xml file:

<taskdef resource="antme.properties" classpath="Path to AntME JAR File" />

The AntME JAR file contains a file named antme.properties that defines the relationship between the various AntME task tags and the corresponding Java classes. Using the line above causes Ant to read this file and define the corresponding tasks. Just make sure that you put the line into the build.xml file before the first place that you use an AntME task.

If you're a glutton for punishment, or if you don't like my choice of tag names, you can manually define each of the tasks yourself, specifying whatever name you prefer instead of the ones I have chosen. The line above is equivalent to the following collection of lines:

<taskdef name="meMachProp" 
         classname="net.sourceforge.antme.tasks.MachinePropertiesTask" 
         classpath="Path to AntME JAR File" />
<taskdef name="meJadEdit" 
         classname="net.sourceforge.antme.tasks.JadEditTask" 
         classpath="Path to AntME JAR File" />
<taskdef name="meSignSuite" 
         classname="net.sourceforge.antme.tasks.SignTask" 
         classpath="Path to AntME JAR File" />

Thus, if you would prefer that the tag for signing your MIDlet suite was named signMySuite, then all you have to do is include the following statement in your build.xml:

<taskdef name="signMySuite" 
         classname="net.sourceforge.antme.tasks.SignTask" 
         classpath="Path to AntME JAR File" />

Of course, if you place the AntME JAR file in the Ant classpath, possibly by placing it in the $ANT_HOME/lib directory, then you can omit the classpath portion of the taskdef tags. Personally, I prefer not to do that, when possible, since this can cause problems later if you upgrade your Ant installation and don't remember all the optional JAR files you've added to the installation, but to each his (or her) own.