bb_ant_tools.jar 使用示例

钮边浩
2023-12-01

<?xml version="1.0" encoding="UTF-8"?>

<project name="${description}" default="buildRIM" basedir=".">

 <taskdef
  resource="bb-ant-defs.xml"
  classpath="lib/bb-ant-tools.jar" />

 <property name="jdehome"
  value="C:/Program Files/Research In Motion/BlackBerry JDE 4.3.0" />

 <property name="simulator" value="${jdehome}/simulator" />

 <property name="bin" value="${jdehome}/bin" />

 <target name="debug" depends="deploy" description="Builds, Deploys Project and Launches Remote Debug Server">
  <exec executable="cmd.exe" dir="${bin}" spawn="true">
   <arg value="/c" />
   <arg value="jdwp.bat" />
  </exec>
 </target>

 <target name="simulate" depends="deploy" description="Builds, Deploys Project and Launches Simulator">
  <exec executable="cmd.exe" dir="${simulator}" spawn="true">
   <arg value="/c" />
   <arg value="8130.bat" />
  </exec>
 </target>
 
 <target name="deploy" depends="buildRIM" description="Builds and Deploys Project">
  <copy todir="${simulator}" overwrite="true">
   <fileset dir="output">
    <include name="*.cod" />
    <include name="*.debug" />
    <include name="*.csl" />
    <include name="*.cso" />
   </fileset>
  </copy>
 </target>

 <target name="buildRIM" description="Builds Project">
  <rapc jdehome="${jdehome}"
   jdkhome="C:/Program Files/Java/jdk1.5.0_11"
   destdir="output"
   output="HelloWorld"
   quiet="false">
   
   <jdp type="cldc"
    title="Hello World Demo"
    vendor="Vendor=Research In Motion Ltd."
    version="Version=0.9"
    description="HelloWorld Application"
    arguments=""
    systemmodule="false"
    runonstartup="false"
    startuptier="7"
    ribbonposition="0"
    icon="../resource/helloworld_jde.png">
   </jdp>
   
   <src>
    <fileset dir=".">
     <include name="src/**/*.java" />
     <include name="resource/**/*.*" />
    </fileset>
   </src>
  </rapc>
 </target>

</project>

 类似资料: