1 Reply Latest reply on Sep 22, 2009 12:53 PM by joetopshot

    Compiling Flex Apps With ANT Problem

    Jaz Chana Level 1

      Hi guys,

       

      I thought i'd have a go at using ANT to compile my applications into a single war file that I could then use to deploy. So far so good, until I got to the last bit. Within the root of my application i have the actionscript source file and underneath that I have an assets folder where all my images and css files live. E.g. app_root/asrc/assets/stylesheets/default.css. Now the ant task i've used to succesfully compile everything else looks like this;

       

           <target name="mxcompile">
              <mxmlc 
                  file="${asrc}/Main.mxml" 
                  output="${dest}/Main.swf"
                  actionscript-file-encoding="UTF-8"
                  keep-generated-actionscript="true"
                  incremental="true"
                  context-root="SOSBetaAdmin"
                  services="WEB-INF/flex/services-config.xml"
                  allow-source-path-overlap="true">
                  
                  <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                  <source-path path-element="${FLEX_HOME}/frameworks"/>
                  <source-path path-element="${asrc}/assets/stylesheets"/>
                  
                  <!-- 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>
                  
                  <!-- include dependencies -->
                  <compiler.library-path dir="." append="true">
                      <include name="libs" />            
                  </compiler.library-path>
              </mxmlc>
          </target>
      

       

      However when i run it i get the following error;

       

      Error: Problem finding external stylesheet: assets/stylesheets/default.css

       

      Its there, its definately there and whats more Flex builder doesn't have a problem with it. So why does running the compiler as an ANT task cause this issue? Am I missing something?