About the Resultant Project

What you have in front of you is a simple J2ME application with just one midlet. To configure the information about your MIDlet, you need to look at the .pom, towards the bottom. Each time you have a new MIDlet to add, simply reiterate that section, thusly:

 <MIDlet>
    <name>SimpleApp</name>
    <icon>/pyx.png</icon>
    <class>org.example.myapp.SimpleMIDlet</class>
 </MIDlet>

The plugin will take care of the rest.

The Basics of J2ME Development

You need to have the wireless toolkit intalled. Install it wherever you want, but be sure to add an environment variable called "WTK_HOME" that points to installation directory. The way to do this varies from system to system, on Linux, you might:

export WTK_HOME="/wtk/";

in your ~/.bashrc.

On windows, add it to your Environment Variables ( Control Panel > System > Advanced > Environment Variables).

Telling the plugin and the Wireless toolkit about "optional" APIs.

Be aware that underneath the plugin beats the heart of the Ant based Antenna. The same properties apply. There are many APIs that may, or may not, be on the target handset. In order to enable an API (for example, an optional JSR), you need to tell Antenna about it and provide the plugin with a way to compile it. Often, there are stub APIs that merely contains compiled empty classes, or, there is support built right into the Wireless Toolkit (which we'll refer to as "WTK"), inside the lib directory. Your task is to merely install the jar of your choice to maven repository and then depend on it from your project. Give the dependency a scope of provided.

Thus, to enable the .jar for JSR 179 (the J2ME Location APIs), I had to enable the Antenna property in the properties element of the pom:

        <wtk.locationservices.enabled>true</wtk.locationservices.enabled>

Then I had to provide a .jar for the compile to get it's hands on:

        <dependency>
            <groupId>javax.microedition</groupId>
            <artifactId>jsr-179</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>

Naturally, that jar came from WTK_HOME/lib/jsr179.jar, and I in turn used the mvn install-file invocation to make it available.

Another way is to use Jar directly from WTK installation

        <dependency>
            <groupId>come.sun.wtk</groupId>
            <artifactId>jsr-179</artifactId>
            <version>2.2</version>
            <scope>system</scope>
            <systemPath>${WTK_HOME}/lib/jsr179.jar</systemPath>
        </dependency>