BlackBerry - Ant script to include JAR in project without external dependancies - blackberry

This is a follow-up to: BlackBerry - use own JAR file in own project & BlackBerry - Ant build script for more complex apps. This problem has now been solved below.
Aim
I want to:
use Ant (bb-ant-tools) to build my library into a JAR file
include that JAR file in a project
use Ant to build that project into a COD that will run on the device (without external COD files).
The important part is to use Ant to do the final stage of the build.
All posts I have found for this problem use Eclipse for that final build stage (details at BlackBerry - use own JAR file in own project).
Progress
I can build the library project into a JAR using Ant.
In Eclipse, I can add that JAR file to a project, and build it as desired (single COD, no external dependencies). It will run on the device.
In Ant, I can also make a build that relies on an extra COD library to contain the runtime code - this is close to what I need.
Problem
I can build the final project with Ant. But the resulting COD file does not include any runtime code from my library.
Many posts I have read show how this can be done using extra COD files for the library. I would like to avoid this.
How can I include a JAR into my project without external dependencies, using Ant? I believe this is possible because I can do it using Eclipse.
Workaround
My current workaround is to include my SDK / library project as source code (as per esaj's answer below), rather than as a JAR file. This has some disadvantages over the JAR approach, but I have a build that runs on the device successfully.
(I hope its OK to cross-reference this question with the following long list of links?)
StackOverflow links:
Continuous Integration server for blackberry development? (and certificate signing) (I haven't had time to go through this one, but I think it looks promising)
Blackberry: Verificattion error when using Library project as External Jar
https://stackoverflow.com/questions/6134940/how-to-use-external-library-jar-file-in-blackberry
Blackberry 5.0 - Add reference to a Java Library Project
How to add external jar or zip file in the Blackberry project
Blackberry Apps - Importing a code-signed jar into an application project
How to add library project with the current development project in blackberry
This one gives other links - quite useful:
Handling dependencies in blackberry development
These not so useful:
In Blackberry, can we create common library that can be used by different applications?
BlackBerry Facebook SDK jar file
Adding and Testing Compatibility of External Jar to Blackberry Project
How to attach Jar in Blackberry
BlackBerry RIMAPPSA2 signing key required -- why?
Is there a list of classes, methods and API which will trigger RIMAPPSA2 permission when signing Blackberry application?
RIM:
javac -target parameter used by the rapc.exe tool
Add a .jar file dependency
Other jar added in BB project - using BB ant tools
Tutorial: How To Use 3rd Party Libraries in your Applications

Have you tried pointing to the library in the src section under rapc?
E.g.:
<rapc ...>
<src>
<fileset dir="${buildDirectory}">
<include name="src/**/*.rrh" />
<include name="src/**/*.rrc" />
<include name="src/**/*.java" />
<include name="res/**/*.*" />
<!-- Libraries -->
<include name="lib/**/*.*" />
</fileset>
</src>
</rapc>

I had a similar problem last year, I had created a "framework" that was used as a base for multiple BB-applications, but run into problems with multiple CODs (I don't remember exactly what, something like the device refused to install multiple applications that had same external cods, if the external CODs weren't installed separately first, and then the applications). As the applications could be installed separately (one person might install only app A, another might install only app B, and yet another might install both A and B), the whole framework needed to be included in all the apps using it. I cooked up this Ant-script using bb-ant-tools (hopefully I didn't break anything removing some stuff specific to our apps and obfuscating package names etc):
<?xml version="1.0" encoding="UTF-8"?>
<project name="${description}" default="build" basedir=".">
<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />
<!-- rapc and sigtool require the jde.home property to be set -->
<!-- NOTE: You may need to copy the signature files from Eclipse\plugins\net.rim.ejde\vmTools to the components\bin -dir
if the keys were installed using the Eclipse-plugin -->
<property name="jdehome" value="C:\BB\Eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components" />
<!-- Framework source locations, these must be set correctly -->
<property name="frameworkRes.dir" value="C:\BB\workspace\BB_Framework\res" />
<property name="frameworkSrc.dir" value="C:\BB\workspace\BB_Framework\src\com\whatever\frame" />
<!-- Locations for simulator, binaries, jde home, don't touch these -->
<property name="simulator" value="${jdehome}\simulator" />
<property name="bin" value="${jdehome}\bin" />
<property name="jde.home" location="${jdehome}" />
<!-- directory of simulator to copy files to -->
<property name="simulator.home" location="${simulator}" />
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="temp.dir" location="C:\tempsrc" />
<!-- Project specific -->
<!-- Application title -->
<property name="app.title" value="Application Name" />
<property name="app.version" value="1.0.0" />
<!-- Value to prepend before frame-class packages -->
<property name="frame.prefix" value="appname" />
<!-- Name of the COD to produce -->
<property name="cod.name" value="Appname" />
<target name="build">
<mkdir dir="${build.dir}" />
<delete dir="${temp.dir}" />
<mkdir dir="${temp.dir}" />
<mkdir dir="${temp.dir}\${frame.prefix}" />
<copy toDir="${temp.dir}">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</copy>
<copy toDir="${temp.dir}\${frame.prefix}">
<fileset dir="${frameworkSrc.dir}">
<include name="**/*.java" />
</fileset>
</copy>
<copy toDir="${temp.dir}\res">
<fileset dir="${frameworkRes.dir}">
<include name="**/*" />
</fileset>
</copy>
<copy toDir="${temp.dir}\res">
<fileset dir="res">
<include name="**/*" />
</fileset>
</copy>
<!-- This replaces the package names for classes copied from under framework-directory to ${frame.prefix} -directory -->
<replace dir="${temp.dir}" value="${frame.prefix}">
<include name="**/*.java"/>
<replacetoken>com.whatever.frame</replacetoken>
</replace>
<rapc output="${cod.name}" srcdir="${temp.dir}" destdir="${build.dir}">
<jdp title="${app.title}"
version="${app.version}"
vendor="Your Company"
icon="../res/img/icon.png"
/>
</rapc>
</target>
<target name="sign">
<sigtool codfile="${build.dir}/${cod.name}.cod" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="load-simulator" depends="build">
<copy todir="${simulator.home}">
<fileset dir="${build.dir}" includes="*.cod,*.cso,*.debug,*.jad,*.jar" />
</copy>
</target>
</project>
What this does, is copy all the java-files and resources from your current project and then from the framework-project to a temporary directory, replacing package names on the way for the frame-work files (as they're put into a separately named directory), this has to do with the fact that the devices also refused to install multiple applications that had same classes under same packages (namely, the framework classes, for your case this might not be necessary). After the copying and replacing is done, the application is built to target build-directory using rapc. There are separate tasks for signing, cleaning and loading the app to a simulator. Hope this helps.

Related

How to Setup an ANT file to create a JAVA JAR that is containing/packaging this calculator?

I already made a running program which is calculator in IntelliJ IDEA and make a test and it goes fine. My problem is that how to setup an ANT file to create a JAVA JAR that is calculator.
Hoping for your answers..
tnx.
This is an example of an ant target that does jar creation.
<!-- roll up everyting into a single jar file -->
<target name="dist" depends="clean, compile" description="Generate the distribution file.">
<!--
Copy the library .jars to the directory where the distribution will be located
-->
<copy todir="${dist}">
<fileset dir="${lib}"/>
</copy>
<!-- TODO: Generate the MANIFEST.MF file on the fly -->
<jar jarfile="${dist}/myCalculator.jar" basedir="${build}" manifest="tools/MANIFEST.MF"/>
<!-- dump to web server -->
<copy todir="${web-files}">
<fileset dir="${dist}"/>
</copy>
</target>
Take a look at the Ant manual page for the Jar task. There are lots of examples there.

Location of xsd for ant ivy lib "antlib:org.apache.ivy.ant" for IDE autocomplete with xsd?

I want create Ivy Ant tasks in xml editor in IDE (Intellij iDEA) with autocomplete based on xsd , but I cannot find xsd for register XML namespace xmlns:ivy="antlib:org.apache.ivy.ant"
Where I can find it?
I just copied the ivy jar to INTELLIJ_HOME/lib/ant and now intellij can resolve the ivy tasks.
Or import this ant file to your ant project, its actually the first ivy example in ivy documentation, make sure to always depend on install-ivy target, add your ant file to idea in the ant build window and you dont even have to install ivy and idea recognizes ivy tasks.
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<property name="ivy.install.version" value="2.2.0" />
<target name="check-ivy-installed" unless="INTERN-ivy.jar.exists">
<available property="INTERN-ivy.jar.exists" file="${ivy.jar.file}"/>
</target>
<target name="download-ivy" depends="check-ivy-installed" unless="INTERN-ivy.jar.exists">
<echo message="downloading and installing ivy"/>
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
<echo message="ivy installed"/>
</target>
<!-- =================================
target: install-ivy
this target is not necessary if you put ivy.jar in your ant lib directory
if you already have ivy in your ant lib, you can simply remove this
target and the dependency the 'go' target has on it
================================= -->
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
<!-- try to load ivy here from local ivy dir, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<echo message="Installing ivy"/>
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
To complete Shalom's answer, the location where to add the ivy.jar for the IntelliJ IDEA Community Edition is INTELLIJ_HOME/lib/ant/lib (one more folder to go).
Maybe it also apply to the full version.
might be, there was no xsd in the past time this discussion started, but at least since may 2011 the ivy scheme is well documented at
http://ant.apache.org/ivy/schemas/ivy.xsd
which is linked right from the documentation in http://ant.apache.org/ivy/
so, to start over using the scheme, you just need:
<?xml version="1.0" encoding="UTF-8"?>
<project name="yourproject"
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
>
<!-- … -->
I guess this discussion might help you. It appears that there is no xsd for the ivy ant tasks, but Eclipse does autocomplete.
yes, no xsd for ivy ant tasks avialable. but i found the way to make autocomplete in Intellij IDEA
in ant build file need to define additional task:
<property name="ivy.jar.dir" value="C:/Apache/apache-ivy-2.2.0/"/>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant">
<classpath>
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</classpath>
</taskdef>
XML plugin for jEdit defines AntCompleteTask (ant task) that produces an xml file called ant-complete.xml. The resulting file looks as follows:
<element-list>
<!-- ... -->
<element name="classpath"
content="(fileset|dirset|extdirs|existing|filelist|pathelement|path)">
<attribute name="id" type="ID" />
<attribute name="location" type="CDATA" />
<attribute name="cache" type="(true|false|on|off|yes|no)" />
<attribute name="refid" type="CDATA" />
<attribute name="description" type="CDATA" />
<attribute name="path" type="CDATA" />
</element>
<!-- ... -->
The generated file may be downloaded as XML plugin archive. Open XML.jar and browse to xml/completion directory. It's syntax is defined in xml-completion-info.dtd.
The task code does not contain an explicit license, but it's at least GPL. Anyway you probably don't need to distribute that task, only to use it and this doesn't require any license.
I can't assess the usability of the resulting xml file, but jEdit uses it for autocompletion.

Blackberry Apps - Importing a code-signed jar into an application project

I'm working on a library project that Blackberry Java developers can import into their projects. It uses protected RIM APIs which require that it be code-signed, which I have done. But, I can't get my Jar imported and working with a simple helloWorld app. I'm using the eclipse plug-in Blackberry-JDE.
EDIT : Solution found....
since I found the solution I removed the things I've tried, leaving only the solution ...
BUILDING THE SDK/Libary (use BB-ANT-TOOLS, either in eclipse or standalone)
steps:
A) I had to build my SDK's jar as an 'cldc' application not as a 'library'
project, using BB-ANT-TOOLS. This solved most of the issues I had above.
B) I then added an ANT task to take the resulting JAR from step A and
do the following:
unzip it,
edit the manifest file to remove the line "MicroEdition-Profile: MIDP-2.0" -- This line causes an error when you try to mark the jar for export.
then re-zipped the jar.
NOTE: I wrote a chopped down BB-ANT-TOOLS ant script to show how you could use
it to do these two steps above. The script is included below.
Consuming the SDK jar as an end-user or in your own project.
Then to integrate the jar in bb-eclipse you do the following:
A) Add the jar to the BuildPath
B) under "Java Build Path" on the "Order and Export" tab, Select the jar for
export. This causes rapc to build the jar into the COD file, so that you only
have one COD at the end.
now when a user builds this project the jar become integrated into the final
cod file, and it's very easy to deliver to the phone or sim.
<?xml version="1.0" encoding="UTF-8"?>
<project name="XXXXXMobileLib" default="full" basedir=".">
<description>
Description: Builds the BBLIB. Uses bb-ant-tools to build, sign and package for blackberry.
</description>
<taskdef resource="bb-ant-defs.xml" classpath="BIN/BB_ANT_lib/bb-ant-tools.1.x.x.jar" />
<property environment="env" />
<!-- User defined Vars -->
<property name="builderRoot" value="." />
<property name="SIG_PASSWORD" value="XXXXXXXXX" />
<property name="javaHome" value="${env.JAVA_HOME}" />
<echo>${javaHome}</echo>
<property name="jdehome" value="${env.BBJDE_HOME}\" />
<property name="simulator" value="${jdehome}\simulator" />
<property name="bin" value="${jdehome}\bin" />
<property name="releaseBuildOut" value="${builderRoot}\release_out\" />
<property name="srcBuildOut" value="${builderRoot}\srcBuild_out\" />
<property name="JarFixTemp" value="${builderRoot}\.tempZip\" />
<property name="buildVersion" value="${env.BUILD_VERSION}" />
<property name="application_id" value="com.XXXXX.foo.bar.${buildVersion}" />
<property name="application_name" value="XXXXX BBLIB v${buildVersion}" />
<property name="application_desc" value="XXXXX BBLIB v${buildVersion}" />
<property name="application_vendor" value="XXXXX" />
<property name="applicaiton_filename" value="XXXXXBBLIB${buildVersion}" />
<property name="applicaiton_srcs" value="${builderRoot}/src_in_location/" />
<property name="zipOutName" value="XXXXX-${buildVersion}BBLIB.zip" />
<property name="zipOutNameJavadocs" value="XXXXX-${buildVersion}BBLIBjavadoc.zip" />
<property name="jde.home" location="${jdehome}" />
<!--
MAIN ENTRY TARGET.
-->
<target name="full" depends="clean,javadoc,buildRIM,FixJarManifest,sign,distribute" />
<target name="FixJarManifest">
<tstamp/>
<mkdir dir="${JarFixTemp}"/>
<unzip src="${builderRoot}/release_out/${applicaiton_filename}.jar" dest="${JarFixTemp}"/>
<delete dir="${builderRoot}/release_out/${applicaiton_filename}.jar"/>
<!-- For some reason rapc puts this line into the manifest file, but it breaks the JDE plug-in when you try to
set the jar for export. Giving an error like this "Project {0} missing......"
To avoid having an empty line in the manifest, Im just injecting a new attribute BuildTime-->
<replace file="${JarFixTemp}/META-INF/MANIFEST.MF" token="MicroEdition-Profile: MIDP-2.0" value="Build-Time: ${DSTAMP}-${TSTAMP}"/>
<zip destfile="${builderRoot}/release_out/${applicaiton_filename}.jar"
basedir="${JarFixTemp}"
/>
<delete dir="${JarFixTemp}"/>
</target>
<!-- Cleanup any existing files in the outdir -->
<target name="clean">
<delete>
<fileset dir="${releaseBuildOut}" includes="**" />
</delete>
</target>
<!-- Generate the Javadocs -->
<target name="javadoc">
<javadoc access="public" destdir="${releaseBuildOut}/JavaDocs" author="true" version="true" use="true" defaultexcludes="yes" excludepackagenames="net.rim.*" windowtitle="FOO_BAR">
<fileset dir="${applicaiton_srcs}/XXXXXMobileLib">
<include name="src/**/*.java" />
</fileset>
</javadoc>
<zip destfile="${releaseBuildOut}/${zipOutNameJavadocs}" basedir="${releaseBuildOut}/JavaDocs" />
<delete dir="${releaseBuildOut}/JavaDocs"/>
</target>
<target name="buildRIM" description="Builds Project">
<rapc jdehome="${jdehome}" jdkhome="${javaHome}" destdir="${releaseBuildOut}" output="${applicaiton_filename}" quiet="false">
<!-- Building as a cldc applicaiton, so it can be packaged up with our final cod, as a single cod -->
<jdp type="cldc"
title="${application_desc}"
vendor="${application_vendor}"
version="${buildVersion}"
description="${application_desc}"
arguments=""
systemmodule="false"
runonstartup="false"
startuptier="7"
ribbonposition="0">
</jdp>
<src>
<fileset dir="${applicaiton_srcs}/MobileLib">
<include name="src/**/*.java" />
</fileset>
</src>
</rapc>
</target>
<target name="sign" depends="clean,buildRIM">
<sigtool password="${SIG_PASSWORD}">
<fileset dir="${releaseBuildOut}" includes="*.cod" />
</sigtool>
<echo>Contents of the signingtool's logfile: </echo>
<echo file="LogFile.txt" />
</target>
<!-- build and distribute the jar -->
<target name="distribute" depends="buildRIM" description="generate the distribution">
<alx destdir="${releaseBuildOut}" filename="${applicaiton_filename}.alx">
<application id="${application_id}" name="${application_name}">
<codset>
<fileset dir="${releaseBuildOut}" includes="*.cod" />
</codset>
</application>
</alx>
<!-- Create release zip -->
<delete file="${releaseBuildOut}/${zipOutName}" />
<zip destfile="${releaseBuildOut}/${zipOutName}">
<!-- zip up the BB jar and drop it for distribution -->
<zipfileset dir="${releaseBuildOut}" includes="**/*.jar" />
</zip>
<move todir="${releaseBuildOut}/UNUSED_BUILD_OUTPUT_FILES/"><!-- move unwanted files, leaving the zip behind -->
<fileset dir="${releaseBuildOut}">
<include name="**/*.*"/>
<exclude name="**/*.zip"/>
</fileset>
</move>
</target>
</project>
I have used your steps A & B to create a 'library' - thanks.
The latest Eclipse plugin for Blackberry (1.3.0.201102031007-19) has a "Blackberry | Package Project" command. I used this to create the jar file (it put it in a 'deliverables' folder in the project).
I then changed the manifest as you suggest to remove MIDP line (which apparently is a known bug). Finally, I followed the steps to add and deploy the lib to my project. (These, btw, are the same steps to adding the Banner / advertising library - very easy.)
I too have a stand-alone / external build script process that uses bb-ant-tools. I recently added the 'external library jar' feature to accommodate this. But using the new feature in Eclipse makes me question if I need to maintain my command-line build scripts as the GUI now does it for me.
The key for me was to switch the build of my library project to a "Blackberry Application" (e.g. CDLC app) as per your instructions. With it set as a 'Library' I was getting that "eviscerated" error.
Thanks for your post.

How to get Flex Builder 3 to generate two builds: one "-use-network=true", another "-use-network=false"?

I'm building a Flex application that will need run under two different deployment scenarios:
First, the application will be hosted on the web. The SWF loads some external resources (images, text) so it requires network access, which is the Flex Builder 3 default build flag "-use-network=true". I don't need to do anything special; it just works.
Second, the application will be written to CD with autorun enabled to launch the index.html hosting the SWF. The SWF still needs to be able to load those same external resources, which reside on the CD in a subfolder. Since those files are on the CD, they are considered local, so Flash security requires the SWF to be built using a flag of "-use-network=false". I add that to the "Additional compiler arguments" text box found under "Flex Compiler" in the Flex project's Properties dialog.
That all works as expected, but it's tedious to have to manually modify the Flex Builder project settings to add or remove that flag as the case may be.
Ideally, I would like to just build the project once and have multiple output folders: one for the network deployment scenario, and another for the local deployment scenario.
What's the best way to do that? Is moving to an Ant build the way to go, or is there a simpler way? If an Ant build configuration is the correct way, do you have an example to share of such multiple build configurations?
Thanks for your help!
Once you get your head around the Ant build, it will make your life a lot easier. Building a multiple build file is no different from a single build file, you will just add an additional task inside of your build with the appropriate settings (you could also use a loop in ant, but that adds complexity)
So, expanding on the Flex Ant Tasks example from the docs, something like this should work (not-tested):
<?xml version="1.0" encoding="utf-8"?>
<!-- myMXMLCBuild.xml -->
<project name="My App Builder" basedir="." default="main">
<taskdef resource="flexTasks.tasks" classpath="${basedir}/flexTasks/lib/flexTasks.jar" />
<property name="FLEX_HOME" value="C:/flex/sdk"/>
<property name="APP_ROOT" value="apps"/>
<property name="DEPLOY_DIR" value="c:/jrun4/servers/default/default-war"/>
<target name="main" depends="clean, compile1, compile2">
</target>
<target name="compile1">
<mxmlc
file="${APP_ROOT}/Main.mxml"
output="${DEPLOY_DIR}/Main.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true"
use-network="true"
>
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<!-- List of path elements that form the roots of ActionScript
class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks"/>
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<!-- Set size of output SWF file. -->
<default-size width="500" height="600" />
</mxmlc>
</target>
<target name="compile2">
<mxmlc
file="${APP_ROOT}/Main.mxml"
output="${CD_DEPLOY_DIR}/Main.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true"
use-network="false"
>
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<!-- List of path elements that form the roots of ActionScript
class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks"/>
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<!-- Set size of output SWF file. -->
<default-size width="500" height="600" />
</mxmlc>
</target>
<target name="clean">
<delete dir="${APP_ROOT}/generated"/>
<delete>
<fileset dir="${DEPLOY_DIR}" includes="Main.swf"/>
</delete>
</target>
</project>
As a side note, if you are going to be running the Ant build in eclipse/Flash Builder you might as well increase the memory now.

Building Flex Project with RSLs and ANT

Can someone give me a code example of how to build a flex project with ANT using framework RSL's?
This is what im currently using but the file SWF generated is way to big;
<target name="main">
<mxmlc
file="${SRC_DIR}/myApp.mxml"
output="${DEPLOY_DIR}/myApp.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true">
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<!-- List of path elements that form the roots of ActionScript
class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks"/>
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
</mxmlc>
</target>
Thanks
This is a great description: http://soenkerohde.com/2008/04/using-the-flash-player-cache-for-the-flex-framework/

Resources