The 'meJadEdit' Task
The meJadEdit class allows JAD files to be
created by Ant build files. It also allows existing JAD files to be
edited. The task has the following basic format:
<meJadEdit outputjad="path to output jad file"
[inputjad="path to input jad file"]
[encoding="file encoding" >]
[<attribute name="attrName" value="attrValue" />]
[<name value="midlet name" />]
[<version value="midlet version" />]
[<incrementVersion />]
[<vendor value="midlet vendor" />]
[<icon value="midlet icon" />]
[<description value="midlet description" />]
[<jarUrl value="JAR URL" />]
[<infoUrl value="Info URL" />]
[<dataSize value="data size" />]
[<midp value="1.0" | "2.0" />]
[<cldc value="1.0" | "1.1" />]
[<jarSize value="jar size" | file="jar file" />]
[<clearMidlets/>]
[<addMidlet name="name" [icon="icon"] className="className" />]
[<setMidlet number="#" name="name" [icon="icon"] className="className" />]
[<removeMidlet name="name" | className="className" | number="#" />]
</meJadEdit >
meJadEdit Task Attributes
Attribute | Value |
inputjad |
Relative or absolute path to a JAD file that is to be loaded. If this is omitted,
the task starts with an empty JAD file, allowing a JAD file to be created from
scratch.
|
outputjad |
Relative or absolute path indicating where the JAD file should be saved.
This path may be the same as the inputjad
parameter, in which case the JAD file is edited in place.
|
encoding |
Specifies the encoding of the input and output JAD file. If omitted, "UTF-8" is
assumed.
|
The actual edit operations performed on the JAD file are specified by the
various nested tags that can be provided within the meJadEdit
task:
Automatic Transformations
When a JAD file is written, this task automatically does the following:
-
"Normalizes" all the attribute names. Thus, if the input JAD file has a non-standard
capitalization, or if one of the standard attributes is incorrectly specified using
the <attribute ...> tag, the writing process
will correct it.
-
Collapses the MIDlet definitions, eliminating any "gaps" in the numbering.
-
Re-orders the JAD attributes into alphabetical order. Note that the MIDP specification
does not require a particular ordering within the JAD file - this ordering is a side
effect of the implementation.
|