title: With Ant, how do I create seperate jar files from one src directory?
body: <p>I have one source directory in which I am trying to create separate cod files since my resources (PNG files) are beyond the limit imposed by the RAPC compiler.</p>
  
  <p>I am trying to create:</p>
  
  <ol>
  <li>.cod(s) for the source</li>
  <li>.cod(s) for low res. resources</li>
  <li>.cod(s) for hi res. resources</li>
  </ol>
  
  <p>Which I am successful in creating the following:</p>
  
  <p>AppMeasurement_BlackBerry.cod</p>
  
  <p>com_mch_coffeehouse-1.cod</p>
  
  <p>com_mch_coffeehouse.cod</p>
  
  <p>com_mch_coffeehouse.jad</p>
  
  <p>com_mch_coffeehouse_resources_hires-1.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-2.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-3.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-4.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-5.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-6.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires-7.cod</p>
  
  <p>com_mch_coffeehouse_resources_hires.cod</p>
  
  <p>com_mch_coffeehouse_resources_lowres-1.cod</p>
  
  <p>com_mch_coffeehouse_resources_lowres-2.cod</p>
  
  <p>com_mch_coffeehouse_resources_lowres-3.cod</p>
  
  <p>com_mch_coffeehouse_resources_lowres-4.cod</p>
  
  <p>com_mch_coffeehouse_resources_lowres.cod</p>
  
  <p>common-1.cod</p>
  
  <p>common.cod</p>
  
  <p>However, the application does not start-up and from the event log on the device, I get that wonderful encrypted message:</p>
  
  <p>RIM Wireless Handheld Java Loader
  Copyright 2001-2009 Research In Motion Limited
  Connected
  guid:0x97C9F5F641D25E5F time: Wed Dec 31 19:00:00 1969  severity:0 type:2 app:System data:JVM:INFOp=23575346,a='5.0.0.979',o='5.1.0.177',h=4001507
  guid:0x9C3CD62E3320B498 time: Fri Jul 01 16:59:26 2011  severity:1 type:3 app:Java Exception data:
          Error
          No detail message
          com_mch_coffeehouse(4E0E2E1F)
           CoffeeHouseClient
           
           0x3764
          com_mch_coffeehouse(4E0E2E1F)
           CoffeeHouseClient
           main
           0x30BD
  guid:0x0 time: Fri Jul 01 16:59:26 2011  severity:2 type:3 app: data:
          Traceback:</p>
  
  <p>guid:0x97C9F5F641D25E5F time: Fri Jul 01 16:59:31 2011  severity:0 type:2 app:System data:JVM:INFOp=23575346,a='5.0.0.979',o='5.1.0.177',h=4001507</p>
  
  <p>Anyway, any help or suggestions is greatly appreciated before this becomes a critical blocker - yippee!</p>
  
  <p>My Ant script:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>
      </p>
  
  <pre><code>&lt;property name="package.label" value="com_mch_coffeehouse" /&gt;
  
  &lt;property name="lowres.label" value="com_mch_coffeehouse_resources_lowres" /&gt;
  
  &lt;property name="hires.label" value="com_mch_coffeehouse_resources_hires" /&gt;
  
  &lt;property name="jde.home" value="C:\Eclipse3.6\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components" /&gt;
  
  &lt;property name="workspace" value="C:\Users\jtp\Documents\mch" /&gt;
  
  &lt;property name="appmeasure" value="${workspace}\AppMeasurement_BlackBerry\deliverables\Standard\5.0.0" /&gt;
  
  &lt;property name="common" value="${workspace}\Common-BlackBerry\deliverables\Standard\5.0.0" /&gt;
  
  &lt;property name="simulator" value="${jde.home}\simulator" /&gt;
  
  &lt;property name="bin" value="${jde.home}\bin" /&gt;
  
  &lt;property name="src" value="src" /&gt;
  
  &lt;property name="respackage" value="${src}\com\mch\coffee_house\res" /&gt;
  
  &lt;property name="hi" value="${respackage}\hi" /&gt;
  
  &lt;property name="low" value="${respackage}\low" /&gt;
  
  &lt;property name="dest" value="deliverables" /&gt;
  
  &lt;property name="ota.dir" value="${dest}\ota" /&gt;
  
  &lt;target name="debug" depends="ota" description="Build, deploy project and Launches Remote Debug Server"&gt;
      &lt;exec executable="cmd.exe" dir="${bin}" spawn="true"&gt;
          &lt;arg value="/c" /&gt;
          &lt;arg value="jdwp.bat" /&gt;
      &lt;/exec&gt;
  &lt;/target&gt;
  
  &lt;target name="simulate" depends="ota" description="Build, deploy project and Launches Simulator"&gt;
      &lt;exec executable="cmd.exe" dir="${simulator}" spawn="true"&gt;
          &lt;arg value="/c" /&gt;
          &lt;arg value="${simulator}\9700.bat" /&gt;
      &lt;/exec&gt;
  &lt;/target&gt;
  
  &lt;target name="ota" depends="build" description="Build OTA project."&gt;
      &lt;mkdir dir="${ota.dir}" /&gt;
      &lt;jadtool input="${dest}\${package.label}.jad" destdir="${ota.dir}"&gt;
          &lt;fileset dir="${appmeasure}" includes="*.cod" /&gt;
          &lt;fileset dir="${common}" includes="*.cod" /&gt;
          &lt;fileset dir="${dest}" includes="*.cod" /&gt;
      &lt;/jadtool&gt;
  &lt;/target&gt;
  
  &lt;target name="deploy" depends="build" description="Build and deploy project."&gt;
      &lt;copy todir="${simulator}" overwrite="true"&gt;
          &lt;fileset dir="${appmeasure}"&gt;
              &lt;include name="*.cod" /&gt;
              &lt;include name="*.debug" /&gt;
              &lt;include name="*.csl" /&gt;
              &lt;include name="*.cso" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
      &lt;copy todir="${simulator}" overwrite="true"&gt;
          &lt;fileset dir="${common}"&gt;
              &lt;include name="*.cod" /&gt;
              &lt;include name="*.debug" /&gt;
              &lt;include name="*.csl" /&gt;
              &lt;include name="*.cso" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
      &lt;copy todir="${simulator}" overwrite="true"&gt;
          &lt;fileset dir="${dest}"&gt;
              &lt;include name="*.cod" /&gt;
              &lt;include name="*.debug" /&gt;
              &lt;include name="*.csl" /&gt;
              &lt;include name="*.cso" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
  &lt;/target&gt;
  
  &lt;target name="build" depends="buildhiresources" description="Builds project."&gt;
      &lt;!-- Copy the resource package to be compiled with preserved folder hierarchy --&gt;
      &lt;!--&lt;copy todir="${dest}"&gt;
          &lt;fileset dir="${src}"&gt;
              &lt;include name="com/mch/coffee_house/res/low/*.png" /&gt;
              &lt;include name="com/mch/coffee_house/res/hi/*.png" /&gt;
              &lt;exclude name="**/*.java" /&gt;
              &lt;exclude name="com/mch/coffee_house/res/torch/*.png" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;--&gt;
      &lt;!--
      ${appmeasure}\AppMeasurement_BlackBerry.jar:${common}\danicacommon.jar:${dest}\com_mch_coffeehouse_resources_hires.jar:${dest}\com_mch_coffeehouse_resources_lowres.jar
      --&gt;
      &lt;rapc jdehome="${jde.home}" jdkhome="${java.home}" import="${appmeasure}\AppMeasurement_BlackBerry.jar:${common}\danicacommon.jar:${dest}\com_mch_coffeehouse_resources_hires.jar:${dest}\com_mch_coffeehouse_resources_lowres.jar" destdir="${dest}" noconvert="false" output="${package.label}" quiet="true" verbose="false" generatesourcelist="false" nopreverify="true"&gt;
          &lt;jdp type="cldc" title="mch coffeehouse" vendor="MCH Inc" version="1.0.0" description="Find a coffee house from your BlackBerry device." arguments="" systemmodule="false" runonstartup="false" startuptier="7" ribbonposition="0" nameresourcebundle="com.mch.coffeehouse" nameresourceid="0" icon="../src/com/mch/coffee_house/res/hi/icon.png"&gt;
          &lt;/jdp&gt;
          &lt;src&gt;
              &lt;fileset dir="."&gt;
                  &lt;exclude name="src/com/mch/coffee_house/res/hi/*.java*" /&gt;
                  &lt;exclude name="src/com/mch/coffee_house/res/low/*.java*" /&gt;
                  &lt;include name="src/**/*.java*" /&gt;
                  &lt;include name="src/**/*.rrc*" /&gt;
                  &lt;include name="src/**/*.rrh*" /&gt;
                  &lt;include name="src/**/*.cod*" /&gt;
                  &lt;include name="src/**/*.cso*" /&gt;
                  &lt;include name="src/**/*.MF*" /&gt;
                  &lt;!-- Add the preserved folder hierachy to be compiled as is --&gt;
                  &lt;!--&lt;include name="${dest}/com/**/*.*" /&gt;--&gt;
              &lt;/fileset&gt;
          &lt;/src&gt;
      &lt;/rapc&gt;
      &lt;sigtool jdehome="${jde.home}" password="########" close="false"&gt;
          &lt;fileset dir="${dest}" includes="*.cod" /&gt;
      &lt;/sigtool&gt;
  &lt;/target&gt;
  &lt;!-- Hi Res. Resources --&gt;
  &lt;target name="buildhiresources" depends="buildlowresources" description="Builds low resolution resources project."&gt;
      &lt;!-- Copy the resource package to be compiled with preserved folder hierarchy --&gt;
      &lt;copy todir="${dest}"&gt;
          &lt;fileset dir="${src}"&gt;
              &lt;include name="com/mch/coffee_house/res/hi/*.png" /&gt;
              &lt;exclude name="com/mch/coffee_house/res/low/*.png" /&gt;
              &lt;exclude name="**/*.java" /&gt;
              &lt;exclude name="com/mch/coffee_house/res/torch/*.png" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
      &lt;rapc jdehome="${jde.home}" jdkhome="${java.home}" destdir="${dest}" noconvert="false" output="${hires.label}" quiet="true" verbose="false" generatesourcelist="false" nopreverify="true"&gt;
          &lt;jdp type="library" title="MCH Library" vendor="MCH Inc" version="1.0.0" description="coffeehouse hi-res resources library."&gt;
          &lt;/jdp&gt;
          &lt;src&gt;
              &lt;fileset dir="."&gt;
                  &lt;!-- Add the preserved folder hierachy to be compiled as is --&gt;
                  &lt;include name="src/com/mch/coffee_house/res/hi/*.java*" /&gt;
                  &lt;include name="${dest}/com/**/*.*" /&gt;
                  &lt;exclude name="${dest}/com/mch/coffee_house/res/low/*.png" /&gt;
              &lt;/fileset&gt;
          &lt;/src&gt;
      &lt;/rapc&gt;
      &lt;sigtool jdehome="${jde.home}" password="########" close="false"&gt;
          &lt;fileset dir="${dest}" includes="*.cod" /&gt;
      &lt;/sigtool&gt;
  &lt;/target&gt;
  &lt;!-- Low Res. Resources --&gt;
  &lt;target name="buildlowresources" description="Builds low resolution resources project."&gt;
      &lt;!-- Copy the resource package to be compiled with preserved folder hierarchy --&gt;
      &lt;copy todir="${dest}"&gt;
          &lt;fileset dir="${src}"&gt;
              &lt;exclude name="com/mch/coffee_house/res/hi/*.png" /&gt;
              &lt;include name="com/mch/coffee_house/res/low/*.png" /&gt;
              &lt;exclude name="**/*.java" /&gt;
              &lt;exclude name="com/mch/coffee_house/res/torch/*.png" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
      &lt;rapc jdehome="${jde.home}" jdkhome="${java.home}" destdir="${dest}" noconvert="false" output="${lowres.label}" quiet="true" verbose="false" generatesourcelist="false" nopreverify="true"&gt;
          &lt;jdp type="library" title="MCH Library" vendor="MCH Inc" version="1.0.0" description="coffeehouse low-res resources library."&gt;
          &lt;/jdp&gt;
          &lt;src&gt;
              &lt;fileset dir="."&gt;
                  &lt;!-- Add the preserved folder hierachy to be compiled as is --&gt;
                  &lt;include name="src/com/mch/coffee_house/res/low/*.java*" /&gt;
                  &lt;include name="${dest}/com/**/*.*" /&gt;
              &lt;/fileset&gt;
          &lt;/src&gt;
      &lt;/rapc&gt;
      &lt;sigtool jdehome="${jde.home}" password="########" close="false"&gt;
          &lt;fileset dir="${dest}" includes="*.cod" /&gt;
      &lt;/sigtool&gt;
  &lt;/target&gt;
  
  &lt;target name="clean" description="Clean the destination directory."&gt;
      &lt;delete dir="${ota.dir}" failonerror="no" /&gt;
      &lt;delete dir="${dest}" failonerror="no" /&gt;
      &lt;mkdir dir="${dest}" /&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p></p>