Ant mxmlc

Hey guys.
I am compiling the flex application with Ant mxmlc on top of
Flex2 with java 5 and getting
Unable to run mxmlc:
flex2.tools.Compiler.mxmlc([Ljava.lang.String;)
Please help me out.

mnake sure to include a jar and a taskdefinition correctly
there is quite detail instroctions on labs.adobe.com search for
flex tasks.

Similar Messages

  • Ant, mxmlc and font managers

    My team is building an AIR application and we are using SVN and a Flex Ant task to compile it on a staging server.  I have a decent understanding of what each piece of the compilation process needs to run and got the AIR application compiled and packaged without too much hassle.
    We recently switched fonts and require the command line switch '-managers=flash.fonts.AFEFontManager' in Flex Builder.  I've been reading about how to get this done and have found two solutions:
    1) Edit the file frameworks/flex-config.xml and change the order of the font managers.  This isn't a great solution because every time we upgrade the SDK on the server we'll have to go through and make this change again.  This process is described in the adobe livedocs http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_06.html
    2) Set it as a managers attribute in the ant build file as described here http://stackoverflow.com/questions/610386/how-to-include-additional-compiler-arguments-whe n-using-mxmlc-ant-task I can't seem to get this to work, I end up with an error like this:
    src/build.xml:75: The <mxmlc> type doesn't support the "compiler.fonts.managers" attribute.
    I get the same error when I use the "managers" alias.
    My question is what is the preferred method of reordering the font managers?  Thanks in advance!

    I forgot to attach the relevant section of my build.xml, here it is:
        <target name="compile.release"
            description="Compile swf modules and main swf" depends="clean">
            <!-- compile main SWF -->
            <mxmlc file="${src.dir}/application.mxml"
                output="${out.dir}/application.swf"
                debug="${DEBUG}"
                optimize="${OPTIMIZE}"
                link-report="${out.dir}/swf-report.xml"
                locale="en_US"
                configname="air"
                compiler.fonts.managers="flash.fonts.AFEFontManager">
                <source-path path-element="${src.dir}" />
                <library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                    <include name="*.swc" />
                </library-path>
                <library-path dir="${FLEX_HOME}/frameworks/libs/air"
                    append="true">
                    <include name="*.swc" />
                </library-path>
                <library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                    <include name="{locale}" />
                </library-path>
                <library-path dir="${lib.dir}" append="true">
                    <include name="*.swc" />
                </library-path>
            </mxmlc>

  • Ant mxmlc problem with SharedResources

    Hi
    i am trying to create an application using flexlib and arcgis api for flex. I compile my flex app using ant with this task
    <target name="flex-compile">
            <mxmlc file="${web.visor}/paginas/main.mxml" locale="en_US" keep-generated-actionscript="false" services="${webinf.visor}/flex/services-config.xml">
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                <source-path path-element="${FLEX_HOME}/frameworks" />
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/en_US" />
                </compiler.library-path>
                <compiler.source-path path-element="${src.visor.flex}" />
                <compiler.external-library-path dir="${lib.flex}">
                    <include name="agslib-1.2-2009-05-15.swc" />
                    <include name="flexlib.swc" />
                </compiler.external-library-path>
            </mxmlc>
        </target>
    but when i try to run the swf file i get this error:
    An ActionScript error has occurred:
    Error: Could not find compiled resource bundle 'SharedResources' for locale 'en_US'.
        at mx.resources::ResourceManagerImpl/http://www.adobe.com/2006/flex/mx/internal::installCompiledResourceBundle()
        at mx.resources::ResourceManagerImpl/installCompiledResourceBundles()
        at mx.managers::SystemManager/installCompiledResourceBundles()
        at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()
        at mx.managers::SystemManager/docFrameListener()
    any ideas ?? sorry, but i am really new to flex
    thanks a lot

    Have you tried to use <compiler.include-libraries> tag to include external libraries in the compilation?
                <!-- Include external Flex Libraries -->
                <compiler.include-libraries dir="${PUREMVC_STANDARD}">
                    <include name="PureMVC_Standard.swc" />
                </compiler.include-libraries>
                <compiler.include-libraries dir="${XIFF}">
                    <include name="XIFF.swc" />
                </compiler.include-libraries>
    I never had a need to use <compiler.external-library-path> tag.

  • How to resolve the "Builld error mxmlc task failed" in flex4 web application

    hi all,
    I am using flex 4 mxml web application wiht as3. when i deploying this project i am facing the folling error.
    Environment:
    Flex 3.5 SDK
    Flash builder 4 .                 APPLICATION NAME: BillProcess
    Ant compile tasks
    ============
        <property name="FLEX_HOME" value="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.5.0/>
        <property name="JAVA_HOME" value="C:\Program Files\Java\jdk1.6.0_06"/>
        <property name="JRE_HOME" value="C:\Program Files\Java\jre1.6.0_06"/>
    ERROR:
    init:
    [ippprojectproperties] qbServer = workplace.intuit.com
       [delete] Deleting directory C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\Dev
        [mkdir] Created dir: C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\Dev
    checkForCustomBuild:
    custombuild:
    dependentProjects:
    compile:
    [ippflexbuild] Parsing: C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess/.actionScriptProperties
    BUILD FAILED
    C:\Documents and Settings\TIVL\Adobe Flash Builder 4\BillProcess\ippbuild.xml:101: mxmlc task failed
    Total time: 16 seconds.
    HOW TO RESOLVE THIS.
    please share your useful suggession,
    cheers,
    B.venkatesan.

    hello,
    Check out this link http://www.kirupa.com/forum/showthread.php?309387-ant-mxmlc-task-don-t-compile-with-FlexSD K-4 this may solve your problem.
                         Gajanan Hiroji | [email protected] | www.isacglobal.com

  • Compilation of adobe air app that uses ANE fails while using the flex ant tasks.

    The resolution seems to be a hack - which when you rename .ane files to .swc, it works.
    I came across this workaround here: http://stackoverflow.com/questions/11112705/using-ant-mxmlc-task-with-native-extension?rq= 1
    <mxmlc file="${app.root}/app.as" 
                   output="${output.dir}/app.swf"
                   allow-source-path-overlap="true"
                   debug="false"
                   actionscript-file-encoding="UTF-8"
                   swf-version="19" >
                <load-config filename="${framework.root}/air-config.xml"/>
                <source-path path-element="${framework.root}"/>
                <source-path path-element="src"/>
                <source-path path-element="other"/>
                <compiler.library-path dir="libs" append="true">
                    <include name="**/*.swc"/>
                </compiler.library-path>
                <!-- THIS DOES NOT WORK -->
                <compiler.external-library-path dir="nativeExtension" append="true">
                    <include name="**/*.ane"/>
                </compiler.external-library-path>
            </mxmlc>
    However, if I rename all the .ane files in the nativeExtension directory to .swc the following change works..
                <!-- THIS WORKS -->
                <compiler.external-library-path dir="nativeExtension" append="true">
                    <include name="**/*.swc"/>
                </compiler.external-library-path>
    Has this issue been addressed?
    I'm using the following:
    - Adobe AIR SDK & Compiler (version 3.7) for Mac OS X
    - ActionScript Compiler 2.0
    - Apache Ant wrapper located in "AIRSDK_Compiler/ant/lib/flexTasks.jar"
    Let me know if any other details will be helpful.

    I'm using something like this in my build.xml (inapp.purchase.flash.swc is the flash wrapper for the ANE):
                <external-library-path dir="${basedir}/extensions/inapp.purchase/inapp.purchase.flash/bin" append="true">
                    <include name="inapp.purchase.flash.swc" />
                </external-library-path>
    I don't think you need ANE when building swf component of your app. ANE is only required for packaging. By linking with external inapp.purchase.flash.swc you're just telling action script compiler that above symbols will be defined later (in ANE).

  • Dispatching GridSelectionEvent throw exception at runtime - A build issue with FB 4.5

    This is a strang probelm I am facing with.
    My code dispatches GridSelectionEvent after setting girds' selected item in one logic path. Following is code lines -
    myDataGrid.selectedItem = instanceTag;
    myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    Flash player throws following error on above statements encounter -
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at spark.accessibility::DataGridAccImpl/eventHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()
    I am saying it is a strang for me because when I use swf file generated by Flex Builder (4.5)'s export to release build, it does not throw error and code works fine as expected.
    But, when I user swf file generated by Ant script, I face the above issue.
    The Flex builder settings is as shown in following image -
    Ant  mxmlc script is as follow -
    <mxmlc      
               file="${basedir}/src/AppMonConfigWizard.mxml"
                static-rsls="false"
               keep-generated-actionscript="false"
               output="${basedir}/bin-release/AppMonConfigWizard.swf" >
         <locale>en_US</locale>
          <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
          <source-path path-element="${FLEX_HOME}/frameworks"/>
          <source-path path-element="${basedir}/src/locale/{locale}"></source-path>
          <compiler.library-path file="${basedir}/../wizard_framework/bin/wizard_framework.swc" append="true"/>
         <compiler.library-path file="${basedir}/../../utils/bin/utils.swc" append="true"/>
          <include-resource-bundles>ErrorMessages</include-resource-bundles>
          <include-resource-bundles>Strings</include-resource-bundles>
    </mxmlc>
    As mentioned earlier that following statements cause exception -
         myDataGrid.selectedItem = instanceTag;
         myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    If I change it to
         myDataGrid.setSelectedIndex(<some index value>)   /*selectedItem replaced with setSelectedIndex*/
         myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    it does not throw exception.  I would like to mention that myDataGrid.selectedItem = instanceTag; does sets the selected item but then in that case issue arises when dispatching event.
    I my application, similar statemetns were lot at many places (as there were no such issue with SDK 3.1 which was using earlier) so instead of making changes there, it would be better to imitate the build that Flex builder uses when exported the release build.
    Thanks in advance,
    Prithveesingh Zankat.

    Solved it: had set the only public surface contracts checkbox by mistake and the cosntructor was protected...
    Luis Abreu

  • RSL problem in Flex3..

    Hi,
    I am new to Flex and need help to use Runtime Shared Library in my project.
    I am trying to create simple RSL Project, but it always gives me error when I try to run from my Tomcat Application Server :
    VerifyError: Error #1014: Class mx.core::Application could not be found.
         at flash.display::MovieClip/nextFrame()
         at mx.managers::SystemManager/deferredNextFrame()
    I am using simple ant-compc and ant-mxmlc to compile my library project and main project :
       <target name="build" depends="clean" >
            <compc output="${FLEX_CUSTOM}/bin/CustomLibrary.swc">
              <include-sources dir="${FLEX_SRC}" includes="*"/>
            </compc>
       </target>
      and..
      <target name="compile">
         <mxmlc file="${FLEX_SRC}/RSLExample.mxml"  output="${FLEX_DEPLOY_DIR}/RSLExample.swf">
              <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
              <compiler.external-library-path dir="${FLEX_CUSTOM}/bin" append="true">
                    <include name="CustomLibrary.swc" />
              </compiler.external-library-path>
              <runtime-shared-libraries url="CustomLibrary.swf" />
         </mxmlc>
      </target>
    When I called from my Tomcat using 'localhost:8080/app', I always get this error. I also have copied 'framework_3.2.0.3958.swz' to  my deployment folder, but this problem is still there.
    Any ideas as to what I am doing wrong? I really need help about this..
    I really appreciate any help and suggestion ..
    Thx in advance,
    Andre

    Hi Natasha,
    Thank You for your help.. The problem in my project is that I am using URL and some parameters to call my 'app.swf' file.
    something like :   /app/flex/app.swf?server=http://localhost:8080/app&flexroot=/flex&lang=en_US
    I just now that I have to change '/' to '%2F' and ':' to '%3A' . I have changed that way and now it's working.
    This is silly mistake and I think I need to read more..
    Thx again for your reply..

  • Mysterious config.as - Expecting either a 'semicolon' or a 'new line' here.

    Compiling with AIR SDK 3.5 with ASC 2.0 preview 5 using Ant mxmlc task.
    I get this error:
    C:\Users\Tomas\Documents\_projects\flash-trunk2\.tools\packaging\config.as:1
    Syntax error: Expecting either a 'semicolon' or a 'new line' here.
    I have no such file "config.as" there nor I know what it is? Is that some kind of generated file? Should it be there?
    I cannot use ASC 2.0 to compile my project due to this issue.
    Thansk for any ideas...
    Tomas

    I'm having the same problem trying to use compile-time constants via <define> tags in my ant build script.  It works if I give it a literal constant like "0" but if I try to use a parameter like "${git.revision} I get this error.
    Appears to be a bug. 

  • How to include assigned .as files in MXMLC ant task ?

    When i use mxmlc ant task, i found that
    the tag <include-sources/> doesn't support !
    ( described by http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a63.html )
    neither SDK version 3.x nor 4.x
    Are they lying?!
    How to include assigned .as files ?
    Thank you !

    My understanding is that mxmlc will use all available resources in the source path, as needed. Instead of giving it individual resources to include, you simply need to give it the source-path that contains those resources. This is different from a library project, which may need to include individual classes that are never used in that library.

  • MXMLC ANT task not including AIR libraries

    Hi Guys,
    This is the MXMLC ant task which I am using the compile my test app. If i set the static-link-runtime-shared-libraries="true" , the AIR libraries gets merged into my output swf. But when this attribute is set to false, I dont see the AIR libraries added to my SWF file. As a result when I run the AIR version fo my project, I dont see the application launch right. I have so many RSL in my project and I wanted to have static-link-runtime-shared-libraries="false". Is there a way to have AIR libraries include in my output file and still have this static-link-runtime-shared-libraries="false".
    <mxmlc
        file="${project.name}/src/Test.mxml"
        output="${build.mxmlc.dir}/Test.swf"
        static-link-runtime-shared-libraries="true"
        >
         <load-config filename="${air.config}"/>
         <source-path path-element="${project.name}/src" />
         <source-path path-element="${flex.frameworks.dir}/libs/air"/>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
       </mxmlc>
    My RSL are compiled using COMPC task and the AIR libraries are included into them using the below attributes of compc task.
    <source-path path-element="${basedir}/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/airframework/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/air/ServiceMonitor/src" />
    I am really stuck with this problem and not able to get my release build launch right. Again, any light on this problem will be of great help.!

        <mxmlc
             file="${project.name}/src/Test.mxml"
             output="${build.mxmlc.dir}/Test.swf"
             static-link-runtime-shared-libraries="true"
        >
              <load-config filename="${air.config}"/>
              <source-path path-element="${project.name}/src" />
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
        </mxmlc>
    This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

  • Swf, swc and the mxmlc, compc ant tasks

    I'm a bit confused on the end result of the mxmlc / compc ant
    tasks, or maybe the difference between swf and swc files. I have a
    library of 60 or so AS3 files used for
    serialization/deserialization of my Java backend (using GDS for
    serialization of data between java serverside and my flex front
    end). I first use the compc ant task on these AS3 files to create a
    swc file. This swc is 453316 bytes. With this flash library, I use
    the mxmlc ant task on my mxml file, which produces a 201,492-byte
    swf file.
    I have a couple questions related to the procedure above.
    Shouldn't the swf file include the swc file, and hence be bigger
    than the swc? I'm just wondering if I deploy the swf file, will it
    have all it needs in the swc file to perform the functions
    correctly?
    My second question relates to setting the
    keep-generated-actionscript="true" in the mxmlc task. When
    doing this, I see all the AS3 code generated. However, it does not
    include 55 of the 60 AS3 classes compiled in the swc. It only
    generated AS3 code for those AS3 classes explicitly declared in the
    mxml code (via import and actual declaration). Am I doing something
    wrong here or is this the way flex does its thing?
    The reason why I'm concerned about this is that I'm getting a
    "ArgumentError: Error #2004: One of the parameters is
    invalid" issue am I'm think its happening in the AS3 code (not
    the Java server side) and I don't know how to debug this.
    Any help would be appreciated. Thanks in advanced!
    -los

    I am also facing with the same problem.....
    Is there any resolution for this problem.?
    Not sure where i am going wrong.
    Any help will be appreciated.
    Thanks in advance.

  • Mxmlc Ant Task Paths

    Hello,
    I'm trying to run the following mxmlc ant task from a relative path:
            <mxmlc
                file="flx/MyApp.mxml"
                output="web/MyApp.swf"
                context-root="MyApp"
                services="web/WEB-INF/flex/services-config.xml"
                compatibility-version="3">
                <source-path
                    path-element="flx"/>
            </mxmlc>
    If I run the task from within the MyApp directory it works fine, but I want to run it from a relative directory, eg:
            ant -f MyApp/build.xml
    or from an ant build file:
            <ant dir="MyApp"/>
    However, in both cases I just get the following error:
            [mxmlc] command line: Error: unable to open 'web/WEB-INF/flex/services-config.xml'
    I really need to use relative paths as it is running as a sub-project of a larger project via an ant build, and there is no concept of changing directories within ant.
    Does anybody know how I can get relative paths to works?
    Thanks

    Thanks. That's what I ended up doing in the end. I also added (prior to that)
    <property name="project.dir" value="."/>
    So that it can be run without manually specifying project.dir. (project.dir will only be set to . if it is not already set by an outer script).
    What I really wanted was for mxmlc to run relative to the ant task, eg.
    <ant dir="project"/>
    Then each task inside the ant build file should run relative to "project". This is how <javac/> works. I don't think Adobe like relative paths though.

  • Mxmlc ant  task with Groovy and ant builder

    Hi,
    i'm doing some Groovy scripting in the build scripts of my project and among the other things have included Flex sources compilation in there. It cares about auto-compilation of source trees so maybe someone will be interested in that:
    http://tech4web.blogspot.com/2008/12/mxmlc-ant-flex-task-in-groovy.html
    Cheers,
    Piotr

    Are you using Adobe FlexAnt?
    On this
    page
    , there is a <compiler.library-path> node that seems to
    import a bundle directory that contains locales. I believe
    <compiler.library-path> is from FlexAnt, so you would need to
    enable it if you haven't.
    Also look on the next page from the link I posted, there is
    another example on how to import bundles in an automation.

  • FlexBuilder 3 = MXMLC and ANT?

    Hi all-
    Admittedly I'm a flash / flex newbie, I have kindof a basic
    question... Flex Builder 3 has the .project and
    .actionScriptProperties files. I'm aware that MXMLC has a
    "--load-config" option. What is the best way to unify those two
    things? I've been trying for a week to get this stuff working using
    basic MXMLC stuff and I've got some things but I don't think it's
    the same thing that running a build in FlexBuilder does.
    The command I'm running is:
    mxmlc +FOO=something +BAR=something
    --load-config=./test-flex-config.xml MyFile.as -output MyOutput.swf
    ...so I think I've gotten far, but I don't understand why I
    can't use "mxmlc
    --load-actionScriptProperties=./.actionScriptProperties" ??? Aren't
    they all made by Adobe?
    --Robert

    No not really (thanks anyway). The link shows basically the same as my input except for the better formatting of the output.
    Both my and the example given both uses the Ant <exec> tag which start ojaudit from the command line. The problems still exist because I would like Ant to know if something was reported and the stop the Ant build process. A kind of "failOnValidationError".
    PMD has this (example below shows and Ant tag called pmd which is part of the PMD system.
    <pmd printToConsole="yes" failOnRuleViolation="on">
    Can ojaudit also do something like this? Or is there a way Ant can "scan" the result from the audit process and take the appropriate action?

  • Mxmlc ant task and locales

    Hi,
    I have property files for several locales, for example
    locale/en_US, locale/en_GB, locale/es_ES, and locale/es. Running
    from within FlexBuilder I can see the various locales just fine.
    However when creating the .swf file using ANT and the <mxmlc>
    task, only en_US is available. I've attached a snippet from my ANT
    script.
    Thanks in advance,
    Rich

    Are you using Adobe FlexAnt?
    On this
    page
    , there is a <compiler.library-path> node that seems to
    import a bundle directory that contains locales. I believe
    <compiler.library-path> is from FlexAnt, so you would need to
    enable it if you haven't.
    Also look on the next page from the link I posted, there is
    another example on how to import bundles in an automation.

Maybe you are looking for

  • Report a Problem is not working

    Accidentally a 6 years old boy installed a paid game and i want a refund . i tried to report a problem but when itunes links me with browser to loging so i can report aproblem after i sing in this message appears "The page you're looking for can't be

  • J2ee1.4 installation error - there are no files requiring installation

    hi all, i downloaded the j2ee sdk 1.4 bundle and installed successfully on my suse 8.2. however when i tried doing it on another suse 8.2 machine using the same bundle i got an error that says : There are no files requiring installation - here's all

  • Problem: Word document with Thai font to PDF

    I have a MS Office 2007 Word document (.doc) that contains both English and Thai language. I need to convert this document to PDF with Acrobat 9 Pro. However, after going through the conversion process from the ribbon within MS Word, all of the Thai

  • How to run my own jar file on nokia 6600?

    i am in urgent need of that. please let me know. i will be grateful to you.

  • How can I get Firefox 4 tot install on my Mac OS 10.5.8 ?

    Firefox asked me to download the latest version, 4.0. I clicked "install" but received a message that my Mac is running on an OS version that is too old. I checked Firefox to see which version Firefox 4 runs on and it says Mac OS 10.5. My Mac is runn