<ANTENNA/>

Antenna

An Ant-to-End Solution For Wireless Java

Version 1.2.1

(c) 2002-2010


Erik Wetterberg
Sourceforge project


News | Overview | Download | Setup | JAD | Build | Package | MakePRC | RAPC
Run | Preverify | Obfuscate | SmartLink | Preprocess | Deploy | Sign | History |

JAD

The WtkJad task allows to create new JAD files from scratch or modify existing ones. In particular, it is able to update the MIDlet-Jar-URL and MIDlet-Jar-Size keys automatically if a JAR file is specified, and increase the MIDlet-Version key if automatic versioning is requested.

The task provides the following parameters:

Parameter Type Required Purpose
jadfile file yes The name of the JAD file to create or update.
jarfile file no The name of the JAR file that accompanies the JAD file. If present, the task tries to update the MIDlet-Jar-URL and MIDlet-Jar-Size attributes. Note that the "deploy" parameter also has an effect on the MIDlet-Jar-URL attribute.
manifest file no If this parameter is present, a MANIFEST file is generated, too. The contents of the manifest are taken from the JAD file, with only the following exceptions:
  • The MIDlet-Jar-Url and MIDlet-Jar-Size keys are obmitted.
  • The MicroEdition-Configuration and MicroEdition-Profile keys are added as specified in the corresponding parameters of the task, or they default to "CLDC-1.0" and "MIDP-1.0", or to what has been set using the wtk.cldc.version and wtk.midp.version properties.
Note that the MANIFEST file is always created from scratch, independent of the "update" parameter.
update boolean no If set to true, an existing JAD file is updated instead of creating a new one from scratch. In update mode, the behaviour is as follows:
  • If a JAR file is specified, the MIDlet-Jar-URL and MIDlet-Jar-Size attributes are modified. Note that the "deploy" parameter also has an effect on the MIDlet-Jar-URL attribute.
  • If one of the name, vendor or version attributes is specified, it overrides the one already present in the JAD file.
  • If at least one MIDlet is specified using the sub-element described below, the whole list of MIDlets in the existing JAD file is cleared.
  • If an attribute is specified using the sub-element described below, it overrides an existing attribute in the JAD file.
target URL no A URL to which the MIDlet suite shall be deployed at a later point. If specified, this URL will prefix the JAR file name in the MIDlet-Jar-URL. The URL must not end with a slash, because one is added automatically.
name string no The name of the MIDlet suite, that is, the value of the MIDlet-Name attribute.
vendor string no The vendor of the MIDlet suite, that is, the value of the MIDlet-Vendor attribute.
version string no The version of the MIDlet suite, that is, the value of the MIDlet-Version attribute.
autoversion boolean no If true, the task attempts to create a new version number for the MIDlet suite. If no MIDlet-Version key exists, version "1.0.0" is assigned. Otherwise, the last of the three numbers is increased by one (assuming some major.minor.micro scheme).
encoding string no Specifies the encoding to use when reading or writing the JAD and MANIFEST files. Defaults to the platform default encoding, when no specified (this might change to UTF-8 in the future).
if String no Provides fine-grained control over task execution based on a property definition. The task will only be executed if the given property is defined.
unless String no Provides fine-grained control over task execution based on a property definition. The task will only be executed if the given property is not defined.

Midlet

The task allows to specify an arbitrary number of MIDlets using a nested element "midlet". This element element provides the following parameters (note that there is no means to specify a MIDlet number. The MIDlets are numbered automatically instead in the order in which they are specified):

Parameter Type Required Purpose
name string yes The MIDlet's name.
icon String no An icon for the MIDlet, specified as a path relative to the root of the JAR file.
class string yes The name of the main MIDlet class.
if String no Provides fine-grained control over the MIDlets based on properties. The MIDlet will only make it to the JAD file if the given property is defined.
unless String no Provides fine-grained control over the MIDlets based on properties. The MIDlet will only make it to the JAD file if the given property is not defined.

Attribute

The task also allows to specify an arbitrary number of attributes using a nested element "attribute". This element provides the following parameters:

Parameter Type Required Purpose
name string yes The attribute name.
value String no The attribute value. If you don't specify this parameter, the given attribute is removed from the JAD file instead.
if String no Provides fine-grained control over the attributes based on properties. The attribute will only be copied to the JAD file if the given property is defined.
unless String no Provides fine-grained control over the attributes based on properties. The attribute will only be copied to the JAD file if the given property is not defined.