Patch for JAD Attr Value Cleanup in Maven Plugin

8 views
Skip to first unread message

joakime

unread,
Apr 26, 2009, 7:43:14 PM4/26/09
to pyx4me-users
Thanks for creating the j2me-maven-plugin!

I whipped up a patch that allows me to manage a list of permissions a
bit easier
in the pom.xml

http://joakim.erdfelt.com/patches/pyx4me-jadattr-value-cleanup.patch

It allows for a <jadAttributes> section like the following ...

<jadAttributes>
<MicroEdition-Profile>${j2me.profile}</MicroEdition-
Profile>
<MicroEdition-Configuration>${j2me.configuration}</
MicroEdition-Configuration>
<MIDlet-Permissions>
javax.microedition.io.Connector.serversocket,
javax.microedition.io.Connector.socket
</MIDlet-Permissions>
</jadAttributes>

I didn't want to have huge lines in the pom.xml, so I seperated the
entries,
which in the current codebase winds up creating the following JAD
format ...

...(snip)...
MIDlet-Permissions: javax.microedition.io.Connector.serversocket,
javax.microedition.io.Connector.socket
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
...(snip)...

which didn't seem right to me, so I added a
AbstractJadWtkMojo.cleanupJdAttributes() method to help cleanup those
attribute values.

The above pom.xml now generates a proper JAD ...

...(snip)...
MIDlet-Permissions: javax.microedition.io.Connector.serversocket,
javax.microedition.io.Connector.socket
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
...(snip)...

[Crosses his fingers and hopes that google groups doesn't 'Line Wrap'
the above example]

I'll be whipping up a patch to allow for cooperation between Eclipse
MTJ's "Application Descriptor" file and the j2me-maven-plugin as well.

- Joakim Erdfelt

Vlad Skarzhevskyy

unread,
Apr 27, 2009, 10:44:32 AM4/27/09
to pyx4me...@googlegroups.com
Thanks Joakim !
 Patch  applied to current code in svn.
--
Vlad
Reply all
Reply to author
Forward
0 new messages