You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Neal <S....@Smartkey.co.uk> on 2003/03/17 17:00:13 UTC
New J2ME Ant task
I've implemented this task recently to help with J2ME development and
thought I'd share it under the GNU general public license.
Please take a look and feel free to use it.
I'd also like this to be added to the external tasks page of the Ant
website. The completed template follows.
Regards - Steve.
<subsection name="Antic">
<p>
Antic is a freely available task for packaging J2ME applications. It
produces both the Jar and
Jad files in a single step. This allows *all* entries to be correclty set
in the jad file,
including the size of the jar file that is produced. This task It has
been used and tested
extensively with Sun's Wireless Toolkit and also the Nokia SDK and emulators.
</p>
<table>
<tr>
<th>Compatibility:</th>
<td>Ant 1.5</td>
</tr>
<tr>
<th>URL:</th>
<td>
<a href="http://www.smartkey.co.uk/antic.html">www.smartkey.co.uk</a>
</td>
</tr>
<tr>
<th>Contact:</th>
<td>
<a href="mailto:support@smartkey.co.uk">smartkey.co.uk</a>
</td>
</tr>
<tr>
<th>License:</th>
<td>GNU General Public License</td>
</tr>
</table>
</subsection>
Re: New J2ME Ant task
Posted by Steve Neal <S....@Smartkey.co.uk>.
Hi Stefan,
You can do the same thing with Antenna but it requires a little trickery to
make sure that the jar-size attribute gets set properly in the jad-file.
With Antenna, the package task will create the jar file but requires that
the jad file already exists before it is run. You must therefore:
create the jad file
create the jar file
update the jad file to include the size of the jar file info
Antic, creates both files simultaneously and will create all the correct
entries as they are created. As both files are created by the same task,
the build file is simpler to read.
Antenna does include functionality beyond this such as obfuscation and
library optimization which is very nice - so I still use it for this.
However, most of the other tasks in the existing J2ME task sets do quite
mundane stuff that can be simply performed with existing Ant tasks, so I
saw no need to implement anything else in my own tasks.
Another feature in Antic deals with the fact that some of the Nokia
emulators have non-standard entries required in the jad file. Antic creates
these by default to ensure that these emulators will work. This is an
undocumented feature currently, as it looks like the new generation
emulators from Nokia are better implemented and don't require these
non-standard entries - I'll probably remove this a bit further down the line.
Regards - Steve.
At 16:12 18/03/2003, you wrote:
>On Mon, 17 Mar 2003, Steve Neal <S....@smartkey.co.uk> wrote:
>
> > I've implemented this task recently to help with J2ME development
>
>Just out of curiosity, what has been wrong with one of the three
>existing sets of tasks?
>
>I've added the pointer, it should appear on the site within the next
>few hours.
>
>Stefan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
Re: New J2ME Ant task
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 17 Mar 2003, Steve Neal <S....@smartkey.co.uk> wrote:
> I've implemented this task recently to help with J2ME development
Just out of curiosity, what has been wrong with one of the three
existing sets of tasks?
I've added the pointer, it should appear on the site within the next
few hours.
Stefan