[wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify
the proper '-keep' optons?
Any idea what is wrong?
Thanks,
earamsey
------- actual ant output: ------------
[wtkobfuscate] Obfuscating C:\Projects\J2ME\CellStory\bin\CellStory.jar with
ProGuard
[wtkobfuscate] ProGuard, version 3.2
[wtkobfuscate] Reading jars...
[wtkobfuscate] Reading program jar
[C:\Projects\J2ME\CellStory\bin\CellStory.jar]
[wtkobfuscate] Reading library zip
[C:\WTK22\wtklib\devices\Series_60_MIDP_SDK_2_1\lib \kmidp20.zip]
[wtkobfuscate] Removing unused library classes...
[wtkobfuscate] Original number of library classes: 305
[wtkobfuscate] Final number of library classes: 6
[wtkobfuscate] Shrinking...
[wtkobfuscate] Removing unused program classes and class elements...
[wtkobfuscate] Original number of program classes: 1
[wtkobfuscate] Final number of program classes: 0
[wtkobfuscate] java.io.IOException: The output jar is empty. Did you
specify the proper '-keep' options?
^^^^^___Error that I get is here
[wtkobfuscate] at proguard.ProGuard.shrink(ProGuard.java:474)
[wtkobfuscate] at proguard.ProGuard.execute(ProGuard.java:86)
[wtkobfuscate] at proguard.ProGuard.main(ProGuard.java:916)
Here is my build.xml file:
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="MIDP2.0" default="n66xx" basedir=".">
- <description>
- Build file for MyLittleProject
- </description>
- <!-- predefined antenna tasks -->
- <taskdef resource="antenna.properties"/>
- <!-- ProGuard home -->
- <property name="wtk.proguard.home" value="C:\proguard3.2"/>
- <!-- RetroGuard home -->
- <property name="wtk.retroguard.home" value="C:\retroguard-v2.0.2"/>
- <property name="midlet.name" value="MyLittleProject"/>
- <property name="midlet.home" value="C:\Projects\J2ME\MyLittleProject"/>
- <target name="build" description="Builds everything">
- <antcall target="n66xx"/>
- </target>
- <target name="n66xx" description="Builds Nokia Models 6600 and 6620">
- <ant dir="devices/nokia66xx" inheritall="true" target="build"/>
- </target>
- <target name="cellstory_init" description="Create directory structure">
- <property name="src_pp" location="${preproc_dir}"/>
- <!-- set global properties -->
- <property name="src" location="src"/>
- <property name="bin" location="bin"/>
- <property name="res" location="res"/>
- <property name="classes" location="classes"/>
- <!-- Create the timestamp -->
- <tstamp/>
- <!-- Make directories -->
- <mkdir dir="${src}"/>
- <mkdir dir="${src_pp}"/>
- <mkdir dir="${bin}"/>
- <mkdir dir="${res}"/>
- <mkdir dir="${classes}"/>
- </target>
- <target name="cellstory" depends="cellstory_init" description="Build it
- all">
- <wtkjad
- jadfile="${bin}/${midlet.name}.jad"
- jarfile="${midlet.name}.jar"
- name="MyLittleProject"
- vendor="Wizzards and Lizzards"
- version="1.0.0">
- <midlet
- name="${midlet.name}"
- icon="${midlet.name}.png"
- class="${midlet.name}.class"/>
- <attribute
- name="deleteConfirm"
- value="Do you really want to delete me?"/>
- </wtkjad>
- <!-- do preprocessing -->
- <wtkpreprocess
- srcdir="${src}"
- destdir="${src_pp}"
- symbols="${symbols}"/>
- <!-- Compile the code -->
- <wtkbuild
- srcdir="${src_pp}"
- destdir="${classes}"
- deprecation="on"
- target="1.4"
- source="1.4"/>
- <!-- Package the classes -->
- <wtkpackage
- jarfile="${bin}/${midlet.name}.jar"
- jadfile="${bin}/${midlet.name}.jad"
- obfuscate="false"
- preverify="false">
- <fileset dir="${classes}" includes="**/*.class"/>
- <fileset dir="${res}" includes="**"/>
- </wtkpackage>
- <wtkobfuscate
- jarfile="${bin}/${midlet.name}.jar"
- jadfile="${bin}/${midlet.name}.jad"
- tojarfile="${bin}/${midlet.name}._jar"
- obfuscator="proguard">
- </wtkobfuscate>
- <wtkpreverify jarfile="${bin}/${midlet.name}.jar"/>
- <!-- run -->
- <wtkrun jadfile="${bin}/${midlet.name}.jad"
- device="Series_60_MIDP_SDK_2_1"/>
- </target>
- <target name="cleanbuild" description="Cleans and builds">
- <ant dir="devices/nokia66xx" inheritall="true" target="cleanbuild"/>
- </target>
- </project>