j2me-maven-plugin ProGuard configuration examples

            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>j2me-maven-plugin</artifactId>
                <version>2.0.2</version>
                <executions>
                   <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <j2meConfiguration>CLDC-1.1</j2meConfiguration>
                    <proguard>true</proguard>
                    <obfuscate>true</obfuscate>
                    <proguardPreverify>true</proguardPreverify>
                    <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                    <inFilter>!net/sf/bluecove/awt/**</inFilter>

                    <proguardOptions>
                        <options>
                            <option>-ignorewarnings</option>
                            <option>-dontusemixedcaseclassnames</option>
                            <option>-defaultpackage 'bc1'</option>
                        </options>
                    </proguardOptions>

                    <jadAttributes>
                        <MIDlet-Permissions>javax.microedition.io.Connector.bluetooth.client,javax.microedition.io.Connector.bluetooth.server</MIDlet-Permissions>
                    </jadAttributes>
                    <midlets>
                        <MIDlet>
                            <name>BlueCove</name>
                            <class>net.sf.bluecove.BlueCoveTestMIDlet</class>
                        </MIDlet>
                    </midlets>
                    <useWtkLibs>false</useWtkLibs>
                    <libs>
                        <lib>${settings.localRepository}/org/microemu/cldcapi11/${me2Version}/cldcapi11-${me2Version}.jar</lib>
                        <lib>${settings.localRepository}/org/microemu/midpapi20/${me2Version}/midpapi20-${me2Version}.jar</lib>
                    </libs>
                    <dependencies>
                        <dependency>
                            <groupId>org.microemu</groupId>
                            <artifactId>microemulator</artifactId>
                            <exclude>true</exclude>
                        </dependency>
                        <dependency>
                            <groupId>net.sf.bluecove</groupId>
                            <artifactId>bluecove</artifactId>
                            <filter>!javax/microedition/io/**,!com/intel/bluetooth/**</filter>
                        </dependency>
                        <dependency>
                            <groupId>com.pyx4me</groupId>
                            <artifactId>cldcunit-se</artifactId>
                            <exclude>true</exclude>
                        </dependency>
                    </dependencies>

                </configuration>
            </plugin>

Use different version of ProGuard

<project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>j2me-maven-plugin</artifactId>
                <executions>
                   <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <wtkHome>${env.WTK_HOME}</wtkHome>
                    <proguard>true</proguard>
                    <proguardVersion>3.10.1</proguardVersion>
                    <obfuscate>true</obfuscate>
                    <midlets>
                        <MIDlet>
                            <name>SimpleDemo</name>
                            <icon>/me2-icon.png</icon>
                            <class>org.microemu.midp.examples.simpledemo.SimpleDemoMIDlet</class>
                        </MIDlet>
                    </midlets>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard</artifactId>
                        <version>3.10.1</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>

        </plugins>
    </build>

</project>