The following antenna task just hangs when run; using
process explorer from sysinternals can see no change
in task cpu, memory, etc... just sits there and does
nothing. Have to kill the task, which fails the build, of
course. Am currently working around it by using the ant
executable definition and defining the BB preverify
executable directly, it works but would like to have a
cleaner build and I thought you'd want to know.
<target name="preverify" depends="javacompile">
<echo message="Preverify ${codename}..."/>
<wtkpreverify
verbose="yes"
srcdir="${unpreverified.classes}"
destdir="${final.classes}"
classpath="$CP"/>
</target>
I made sure $CP contained Jdk-jar.exe, srcdir points to
valid dir with just compiled classes, destdir exists, etc..,
etc....
JDK is 1.4.2, antenna is 0.9.13, using eclipse Version:
3.0.2 Build id: 200503110845, myeclipse version
3.8.4+qf2 build-200502031200.
Except for my libs and code names, running
substantially the antenna task from the mobilized
software example for using antenna to build BB projects
which is found at:
http://www.mobilizedsoftware.com/showArticle.jhtml?
articleId=48800167&printableArticle=true
This is the antenna task as found at mobilized software:
<?xml version="1.0"?>
<project name="MyClientApp" default="build"
basedir=".">
<property name="ver" value="1.0"/>
<property name="codename" value="MyClientApp"/>
<property name="midp_lib"
location="${j2mewtk.home}/lib/midpapi.zip"/>
<property name="build.jars" location="lib/thirdparty"/>
<property name="bbjdebuild.jars"
location="${build.jars}/jde3.7"/>
<property name="net_rim_api.jar"
value="${bbjdebuild.jars}/net_rim_api.jar"/>
<property name="src" location="src"/>
<property name="resources" location="res"/>
<property name="lib" location="lib"/>
<property name="unpreverified.classes"
value="classes/unpreverified"/>
<property name="obfuscated.classes"
value="classes/obfuscated"/>
<property name="final.classes" value="classes/final"/>
<property name="name" value="${codename}"/>
<property name="jad.template"
value="worktrack.jad.template"/>
<property name="jadfile" value="output/tojar/
${name}.jad"/>
<property name="jarfile" value="output/tojar/
${name}.jar"/>
<property name="manifest.template"
value="manifest.template"/>
<property name="manifestfile" value="MANIFEST.MF"/>
<property name="temp.jar" value="output/tojar/${name}
_t.jar"/>
<property name="obfuscated.jar" value="output/tojar/
${name}_t_o.jar"/>
<property name="preverified.jar" value="output/tojar/
${name}_p.jar"/>
<property name="final.jar" value="output/tojar/
${name}.jar"/>
<property name="wtk.home" value="${j2mewtk.home}"/>
<property name="antenna.jar" value="antenna-bin-
0.9.12.jar"/>
<taskdef name="wtkbuild"
classname="de.pleumann.antenna.WtkBuild"
classpath="${build.jars}/${antenna.jar}"/>
<taskdef name="wtkpreverify"
classname="de.pleumann.antenna.WtkPreverify"
classpath="${build.jars}/${antenna.jar}"/>
<taskdef name="wtkpackage"
classname="de.pleumann.antenna.WtkPackage"
classpath="${build.jars}/${antenna.jar}"/>
<target name="init" depends="clean">
<mkdir dir="classes"/>
<mkdir dir="${unpreverified.classes}"/>
<mkdir dir="${obfuscated.classes}"/>
<mkdir dir="${final.classes}"/>
<mkdir dir="output"/>
<mkdir dir="output/tojar"/>
<mkdir dir="output/tocod"/>
</target>
<target name="clean">
<delete file="${name}.jad"/>
<delete file="${name}.jar"/>
<delete file="${codename}.cod"/>
<delete file="${codename}.lst"/>
<delete file="${codename}.debug"/>
<delete file="${codename}.csl"/>
<delete file="${codename}.cso"/>
<delete dir="classes"/>
<delete dir="output"/>
</target>
<!-- Preverify the compiled code -->
<target name="javacompile">
<wtkbuild
srcdir="${src}" destdir="${unpreverified.classes}"
bootclasspath="${net_rim_api.jar}"/>
</target>
<!-- Preverify the compiled code -->
<target name="preverify" depends="javacompile">
<wtkpreverify
srcdir="${unpreverified.classes}"
destdir="${final.classes}"
classpath="${net_rim_api.jar}"/>
</target>
<!-- Version the JAD and MANIFEST Files -->
<target name="version" depends="preverify">
<!-- Version the MANIFEST -->
<filter token="buildVer" value="${ver}" />
<filter token="midletName" value="${name}" />
<copy file="${manifest.template}"
tofile="${manifestfile}" filtering="true" overwrite="true" />
<!-- Version the JAD file -->
<filter token="buildVer" value="${ver}" />
<filter token="midletName" value="${name}" />
<filter token="jarName" value="${name}.jar" />
<copy file="${jad.template}" tofile="${jadfile}"
filtering="true" overwrite="true" />
</target>
<!-- Package (JAR) the compiled classes. This also
modifies the JAD file with JAR size information -->
<target name="package" depends="version">
<delete dir="${final.classes}/META-INF" />
<wtkpackage jarfile="${final.jar}" jadfile="${jadfile}">
<fileset dir="${final.classes}"/>
<fileset dir="${resources}"/>
</wtkpackage>
</target>
<!-- Invoke the RAPC compiler. This step is based the
RAPC's usage:
rapc.exe import=RIM_APIs codename=Codename
JAD-File JAR-File
-->
<target name="rapc" depends="package"
description="RIM COD Compiler">
<exec dir="."
executable="${bbjdebuild.jars}/rapc.exe">
<arg line=" import=${net_rim_api.jar} "/>
<arg line=" codename=${codename} "/>
<arg line=" ${jadfile} "/>
<arg line=" ${jarfile} "/>
</exec>
</target>
<!-- Once the COD file has been generated, move
generated file to output directory -->
<target name="build" depends="rapc">
<move file="${codename}.cod" tofile="output/tocod/
${codename}.cod"/>
<move file="${codename}.debug" tofile="output/tocod/
${codename}.debug"/>
<move file="${codename}.cso" tofile="output/tocod/
${codename}.cso"/>
<copy file="${codename}.alx" tofile="output/tocod/
${codename}.alx"/>
<copy file="${jadfile}" tofile="output/tocod/
${codename}.jad"/>
</target>
</project>